public static string EncryptPasswordstring Password { System.Text.UnicodeEncoding encoding = new System.Text.UnicodeEncoding; byte[] hashBytes = encoding.GetBytesPassword; //Compute th
Trang 1public 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);
}