public GetSHA256 ( string password ) : string | ||
password | string | |
return | string |
public string GetSHA256(string password)
{
var salt = "Vuhgmfgz";
var inputString = password + salt;
var crypt = new System.Security.Cryptography.SHA256Managed();
var hash = new StringBuilder();
var crypto = crypt.ComputeHash(Encoding.UTF8.GetBytes(inputString), 0, Encoding.UTF8.GetByteCount(inputString));
foreach (byte theByte in crypto)
{
hash.Append(theByte.ToString("x2"));
}
return hash.ToString();
}