System.Data.Entity.CacheUserBase.SetPassword C# (CSharp) Method

SetPassword() public method

Set a new password.
public SetPassword ( string password ) : void
password string New password.
return 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());
            }
        }