我有这个方法来散列字符串:
byte[] buffer = enc.GetBytes(text);
SHA1CryptoServiceProvider cryptoTransformSHA1 =
new SHA1CryptoServiceProvider();
string hash = BitConverter.ToString(
cryptoTransformSHA1.ComputeHash(buffer)).Replace("-", "");
return hash;
Run Code Online (Sandbox Code Playgroud)
我的问题是:
对于相同的字符串,结果哈希是否始终相同?
我几天前打了一个字符串,似乎它现在导致另一个哈希,但我不确定.