Example #1
0
        public void TestThatHashVerifiesComplext()
        {
            var secret = "Thi$ isAM0re C*mple+ S3CR37";
            var hasher = new SCryptHasher(16384, 8, 1);
            var hashed = hasher.Hash(secret);

            Assert.True(hasher.Verify(secret, hashed));
        }
Example #2
0
        public void TestThatHashVerifiesComplextGreaterTiming()
        {
            var secret = "(Thi$) isAn Ev0nM0re c*mple+ S3CR37 --!.";
            var hasher = new SCryptHasher(65536, 64, 1);
            var hashed = hasher.Hash(secret);

            Assert.True(hasher.Verify(secret, hashed));
        }
Example #3
0
        public void TestThatHashVerifiesSimple()
        {
            var secret = "secret";
            var hasher = new SCryptHasher(16384, 8, 1);
            var hashed = hasher.Hash(secret);

            Assert.True(hasher.Verify(secret, hashed));
        }