System.Data.Entity.UserBase.VerifyPassword C# (CSharp) Method

VerifyPassword() public method

Verify a password is equal to this entity.
public VerifyPassword ( string password ) : bool
password string Password to verify.
return bool
        public virtual bool VerifyPassword(string password)
        {
            using (var sha = System.Security.Cryptography.SHA1.Create())
            {
                var data = sha.ComputeHash(sha.ComputeHash(System.Text.Encoding.UTF8.GetBytes(password)).Concat(Salt).ToArray());
                for (int i = 0; i < 20; i++)
                    if (data[i] != Password[i])
                        return false;
                return true;
            }
        }