Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (15.08 KB, 1 trang )
public static string EncryptPassword(string Password)
{
System.Text.UnicodeEncoding encoding = new System.Text.UnicodeEncoding();
byte[] hashBytes = encoding.GetBytes(Password);
//Compute the SHA-1 hash
SHA1CryptoServiceProvider sha1 = new SHA1CryptoServiceProvider();
byte[] cryptPassword = sha1.ComputeHash(hashBytes);
return BitConverter.ToString(cryptPassword);
}