public SetPassword ( string password ) : void | ||
password | string | New password. |
Результат | void |
public void SetPassword(string password)
{
Random rnd = new Random();
Salt = new byte[6];
rnd.NextBytes(Salt);
using (var sha = System.Security.Cryptography.SHA1.Create())
{
Password = sha.ComputeHash(sha.ComputeHash(System.Text.Encoding.UTF8.GetBytes(password)).Concat(Salt).ToArray());
}
}