public string Generate(int passwordLength) { if (passwordLength < 6) { throw new ArgumentOutOfRangeException(nameof(passwordLength), "Password length cannot be less than 6 characters"); } var generator = new RandomStringGenerator(); return(generator.Generate(passwordLength, ALLOWED_CHARACTERS)); }
public string Generate(int passwordLength) { var generator = new RandomStringGenerator(); return(generator.Generate(passwordLength, ALLOWED_CHARACTERS)); }