public static string HashPassword(string text)
{
string strHash = string.Empty;
System.Security.Cryptography.SHA1 hash = System.Security.Cryptography.SHA1.Create();
System.Text.ASCIIEncoding encoder = new System.Text.ASCIIEncoding();
byte[] combined = encoder.GetBytes(text);
hash.ComputeHash(combined);
strHash = Convert.ToBase64String(hash.Hash);
return strHash;
}
SHA1对密码进行简单的单向加密算法
最新推荐文章于 2021-08-26 16:07:16 发布