예제 #1
0
        public static Password MakeNew(string password, IHashService hashService)
        {
            CheckRule(new MinLengthRule(password, 6));
            CheckRule(new AtLeastOneNumberAndOneLetterRule(password));
            CheckRule(new NonAlphaCharactersRule(password));
            var hashedPassword = hashService.Encrypt(password);

            return(MakeFromEncrypted(hashedPassword));
        }