Example #1
0
        public void DeriveKey_trims_whitespace_and_lowercases_username()
        {
            var key = Util.DeriveKey(" UsErNaMe ", Password, 100);

            Assert.Equal(DerivedKey.Decode64(), key);
        }
Example #2
0
        public void HashPassword_returns_hashed_password()
        {
            var hash = Util.HashPassword(Password, DerivedKey.Decode64());

            Assert.Equal(PasswordHash.Decode64(), hash);
        }
Example #3
0
        public void DeriveKey_returns_derived_key()
        {
            var key = Util.DeriveKey(Username, Password, 100);

            Assert.Equal(DerivedKey.Decode64(), key);
        }