Beispiel #1
0
        public void Test_hash_string_should_contain_correct_method(string target, SecurityUtils.HashMethod method)
        {
            // Act
            var hash = SecurityUtils.Hash(target, method);

            // Assert
            var isCorrect = SecurityUtils.CheckHash(target, hash);

            Assert.True(isCorrect);
        }
Beispiel #2
0
 /// <inheritdoc />
 public PasswordVerificationResult VerifyHashedPassword(string hashedPassword, string providedPassword)
 {
     // Should not be there.
     return(SecurityUtils.CheckHash(providedPassword, hashedPassword) ?
            PasswordVerificationResult.Success : PasswordVerificationResult.Failed);
 }