Esempio n. 1
0
        public void ChangePassword(string password)
        {
            var salt = Password.CreateRandomSalt();
            var hashedPassword = new Password(password, salt);

            ApplyChange(new AccountPasswordChanged(Id, hashedPassword.ComputeSaltedHash(), salt));
        }
        public void ComputeSaltedHash_Hashes_The_Password()
        {
            var password = "******";
            var hasher = new Password(password, 30);

            Assert.NotEqual("test123", hasher.ComputeSaltedHash());
        }