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 classGenerator.CharacterTypesCharacter types to use for password generation. -
Constructor Summary
Constructors Constructor Description Generator() -
Method Summary
Modifier and Type Method Description static java.lang.StringgeneratePassphrase(java.lang.String delimiter, int words)Generates a passphrase from the eff_large standard dictionary with the requested word count.static java.lang.StringgeneratePassphrase(java.lang.String delimiter, int words, Dictionary dictionary)Generates a passphrase from the supplied dictionary with the requested word count.static java.lang.StringgenerateRandomPassword(Generator.CharacterTypes characterTypes, int length)Generates a random password of the specified length with the specified characters.
-
Constructor Details
-
Generator
public Generator()
-
-
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 wordswords- 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 wordswords- the count of words you want in your passphrasedictionary- 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 passwordlength- the length of the password- Returns:
- the password
-