public static string SHAHash(string valueToHash, string salt)
{
System.Security.Cryptography.SHA512Managed hasher = new System.Security.Cryptography.SHA512Managed();
Byte[] valueToHashAsByte = System.Text.Encoding.UTF8.GetBytes(string.Concat(valueToHash, salt));
Byte[] returnBytes = hasher.ComputeHash(valueToHashAsByte);
hasher.Clear();
return Convert.ToBase64String(returnBytes);
}

9652

被折叠的 条评论
为什么被折叠?



