예제 #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);
        }
예제 #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;
        }