Package com.logicaldoc.util.security
Class PasswordGenerator
- java.lang.Object
-
- com.logicaldoc.util.security.PasswordGenerator
-
public class PasswordGenerator extends Object
A password generator utility- Since:
- 6.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
generate(int length, int uppercaseChars, int lowercaseChars, int digits, int specialChars, int maxSequenceSize, int maxOccurrences)
Generates a new passwordstatic void
main(String[] args)
static String
shuffleString(String string)
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
generate
public static String generate(int length, int uppercaseChars, int lowercaseChars, int digits, int specialChars, int maxSequenceSize, int maxOccurrences)
Generates a new password- Parameters:
length
- dimension of the passworduppercaseChars
- minimum number of upper case charslowercaseChars
- minimum number of lower case charsdigits
- minimum number of digitsspecialChars
- minimum number of special charsmaxSequenceSize
- maximum size of a sequencemaxOccurrences
- maximum number of occurrences of the same char- Returns:
- the generated password
-
-