コード例 #1
0
        public void TestGenerateSaltMethod()
        {
            var salt = PBKDF_Helper.GenerateSalt();

            Assert.IsNotNull(salt);

            Assert.IsInstanceOfType(salt, typeof(byte[]));
        }
コード例 #2
0
        public void TestHashPasswordMethod()
        {
            var salt = PBKDF_Helper.GenerateSalt();

            var hashedpassword = PBKDF_Helper.HashPassword("password", salt, 200000);

            var hashedpassword2 = PBKDF_Helper.HashPassword("password", salt, 200000);

            Assert.IsTrue(hashedpassword.Equals(hashedpassword2));
        }