我尝试获取 md5 哈希:
String clearKey = "test";
IBuffer buffEntry = CryptographicBuffer.ConvertStringToBinary(clearKey, BinaryStringEncoding.Utf8);
HashAlgorithmProvider algProvider = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Md5);
IBuffer buffHashed = algProvider.HashData(buffEntry);
byte[] bytesKey;
CryptographicBuffer.CopyToByteArray(buffHashed, out bytesKey);
Debug.WriteLine(String.Format("bytesKey lenght : {0}", bytesKey.Length));
为什么我的结果大小为 16 字节?如何获得经典的 32 字节结果?
感谢您的帮助,