Class PasswordGenerator

java.lang.Object
energy.eddie.regionconnector.shared.utils.PasswordGenerator

public class PasswordGenerator extends Object
  • Field Details

  • Constructor Details

    • PasswordGenerator

      public PasswordGenerator(SecureRandom secureRandom)
  • Method Details

    • generatePassword

      public String generatePassword(int length)
      Creates a random password using a SecureRandom that contains at least 3 special, 3 lowercase and 3 uppercase characters as well as at least 3 digits. The password will consist of only ASCII characters.
      Parameters:
      length - Total length of the password, must be >= 12.
    • generatePassword

      public String generatePassword(int length, int minSpecial, int minLowercase, int minUppercase, int minDigits)
      Generates a new password.
      Parameters:
      length - Total length of the password, must be greater than 0.
      See Also: