encrypt/decrypt password using SHA256 hasher algo....urgent

Posted by Rickeybglr under ASP.NET on 10/22/2011 | Points: 10 | Views : 4620 | Status : [Member] | Replies : 0
I am able to encrypt the password but not able to decrypt the same. plz help me out on this:
here is my code for encryption:

public string pswdEncrypt(string password)
{
SHA256 hasher = SHA256Managed.Create();
byte[] hashedData = hasher.ComputeHash(Encoding.Unicode.GetBytes(password));
// Now we'll make it into a hexadecimal string for saving
StringBuilder sb = new StringBuilder(hashedData.Length * 2);

foreach (byte b in hashedData)
{
sb.AppendFormat("{0:x2}", b);
}
password = sb.ToString();
return password;
}




Responses

(No response found.)

Login to post response