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)); }