Esempio 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);
        }
Esempio 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;
        }