Class Generator

java.lang.Object
me.gosimple.nbvcxz.resources.Generator

public class Generator extends Object
Password generation class
Author:
Adam Brusselback.
  • Constructor Details

    • Generator

      public Generator()
  • Method Details

    • generatePassphrase

      public static String generatePassphrase(String delimiter, int words)
      Generates a passphrase from the eff_large standard dictionary with the requested word count.
      Parameters:
      delimiter - delimiter to place between words
      words - the count of words you want in your passphrase
      Returns:
      the passphrase
    • generatePassphrase

      public static String generatePassphrase(String delimiter, int words, Dictionary dictionary)
      Generates a passphrase from the supplied dictionary with the requested word count.
      Parameters:
      delimiter - delimiter to place between words
      words - the count of words you want in your passphrase
      dictionary - the dictionary to use for generating this passphrase
      Returns:
      the passphrase
    • generateRandomPassword

      public static String generateRandomPassword(Generator.CharacterTypes characterTypes, int length)
      Generates a random password of the specified length with the specified characters.
      Parameters:
      characterTypes - the types of characters to include in the password
      length - the length of the password
      Returns:
      the password