我已经使用下面的代码为密码创建了一个哈希值。我正在存储从下面的方法返回的值。
public static string CreateHash(string password)
{
// Generate a random salt
RNGCryptoServiceProvider csprng = new RNGCryptoServiceProvider();
byte[] salt = new byte[24];
csprng.GetBytes(salt);
HashAlgorithm hashAlg = new SHA256CryptoServiceProvider();
byte[] bytValue = System.Text.Encoding.UTF8.GetBytes(salt + ":" + password);
// Hash the password and encode the parameters
byte[] bytHash = hashAlg.ComputeHash(bytValue);
return
Convert.ToBase64String(bytHash);
}
现在我想解码上面创建的哈希值..我需要密码的字符串值..我该怎么做..?