Class PasswordGenerator
java.lang.Object
energy.eddie.regionconnector.shared.utils.PasswordGenerator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongeneratePassword(int length) Creates a random password using aSecureRandomthat contains at least 3 special, 3 lowercase and 3 uppercase characters as well as at least 3 digits.generatePassword(int length, int minSpecial, int minLowercase, int minUppercase, int minDigits) Generates a new password.
-
Field Details
-
SPECIAL_CHARS
- See Also:
-
LOWER_CASE_CHARS
- See Also:
-
UPPER_CASE_CHARS
- See Also:
-
DIGIT_CHARS
- See Also:
-
-
Constructor Details
-
PasswordGenerator
-
-
Method Details
-
generatePassword
Creates a random password using aSecureRandomthat 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:
-