Class PasswordGenerator


  • public class PasswordGenerator
    extends Object
    A password generator utility
    Since:
    6.0
    Author:
    Marco Meschieri - LogicalDOC
    • Method Detail

      • main

        public static void main​(String[] args)
      • shuffleString

        public static String shuffleString​(String string)
      • 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 password
        uppercaseChars - minimum number of upper case chars
        lowercaseChars - minimum number of lower case chars
        digits - minimum number of digits
        specialChars - minimum number of special chars
        maxSequenceSize - maximum size of a sequence
        maxOccurrences - maximum number of occurrences of the same char
        Returns:
        the generated password