I was looking at a website that talked about encrypting passwords and such for database entry. They give the following code
<%@ Import Namespace="System.Web.Security" %>
<html>
<head>
<script language="VB" runat=server>
' This function encrypts the input string using the SHA1 and MD5
' encryption algorithms
Sub encryptString(Src As Object, E As EventArgs)
SHA1.Text = CookieAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "SHA1"
MD5.Text = CookieAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "MD5"
End Sub
</script>
</head>
<body>
Say I take SHA1.text and input it into a database encrypted. How would I decrypted it when pulling it back to the page. I didn't see any data on that.
<%@ Import Namespace="System.Web.Security" %>
<html>
<head>
<script language="VB" runat=server>
' This function encrypts the input string using the SHA1 and MD5
' encryption algorithms
Sub encryptString(Src As Object, E As EventArgs)
SHA1.Text = CookieAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "SHA1"
MD5.Text = CookieAuthentication.HashPasswordForStoringInConfigFile(txtPassword.Text, "MD5"
End Sub
</script>
</head>
<body>
Say I take SHA1.text and input it into a database encrypted. How would I decrypted it when pulling it back to the page. I didn't see any data on that.