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;
}