java.lang.Object
me.gosimple.nbvcxz.resources.Generator
Password generation class
- Author:
- Adam Brusselback.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCharacter types to use for password generation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgeneratePassphrase(String delimiter, int words) Generates a passphrase from the eff_large standard dictionary with the requested word count.static StringgeneratePassphrase(String delimiter, int words, Dictionary dictionary) Generates a passphrase from the supplied dictionary with the requested word count.static 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
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
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
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
-