Пример #1
0
        public void Computed_PBKDF2_hashes_match()
        {
            IPasswordProvider provider = new PBKDF2PasswordProvider();

            var password = provider.HashPassword("plaintextpassword");

            Assert.IsTrue(provider.Verify("plaintextpassword", password));
        }
Пример #2
0
        public void Computed_PBKDF2_hash_is_correct_length()
        {
            IPasswordProvider provider = new PBKDF2PasswordProvider();

            var password = provider.HashPassword("plaintextpassword");

            Assert.AreEqual(password.Length, 133);
        }