Exemplo n.º 1
0
        public bool Verify(string password, string passwordHashString)
        {
            var parameters = new SimpleHashParameters(passwordHashString);

            int hashSize = Convert.FromBase64String(parameters.PasswordHash).Length;

            string newPasswordHash = ComputeHash(password, parameters.Salt, parameters.Iterations, hashSize);

            return(parameters.PasswordHash == newPasswordHash);
        }
Exemplo n.º 2
0
        public bool Verify(string password, string passwordHashString)
        {
            var parameters = new SimpleHashParameters(passwordHashString);

            int hashSize = Convert.FromBase64String(parameters.PasswordHash).Length;

            string newPasswordHash = ComputeHash(password, parameters.Salt, parameters.Iterations, hashSize);

            return parameters.PasswordHash == newPasswordHash;
        }