Class Generator

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

public class Generator
extends java.lang.Object
Password generation class
Author:
Adam Brusselback.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  Generator.CharacterTypes
    Character types to use for password generation.
  • Constructor Summary

    Constructors 
    Constructor Description
    Generator()  
  • Method Summary

    Modifier and Type Method Description
    static java.lang.String generatePassphrase​(java.lang.String delimiter, int words)
    Generates a passphrase from the eff_large standard dictionary with the requested word count.
    static java.lang.String generatePassphrase​(java.lang.String delimiter, int words, Dictionary dictionary)
    Generates a passphrase from the supplied dictionary with the requested word count.
    static java.lang.String generateRandomPassword​(Generator.CharacterTypes characterTypes, int length)
    Generates a random password of the specified length with the specified characters.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • generatePassphrase

      public static java.lang.String generatePassphrase​(java.lang.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 java.lang.String generatePassphrase​(java.lang.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 java.lang.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