Package fr.becpg.repo.authentication
Class SecurePasswordGenerator
java.lang.Object
fr.becpg.repo.authentication.SecurePasswordGenerator
Utility class that generates a random password using a cryptographically strong
random source (
SecureRandom).
The generated password has the following characteristics:
- Length: 14 characters.
- Contains at least one uppercase letter (
A-Z). - Contains at least one lowercase letter (
a-z). - Contains at least one digit (
0-9). - Contains at least one special character from:
!@#$%^&*()-_=+[]{}.
- Author:
- matthieu
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgeneratePassword.private static charrandomChar(String chars) private static StringshuffleString(String input)
-
Field Details
-
RANDOM
-
UPPER
- See Also:
-
LOWER
- See Also:
-
DIGIT
- See Also:
-
SPECIAL
- See Also:
-
ALL
- See Also:
-
-
Constructor Details
-
SecurePasswordGenerator
private SecurePasswordGenerator()
-
-
Method Details
-
generatePassword
generatePassword.
- Returns:
- a
Stringobject
-
randomChar
-
shuffleString
-