| java.lang.Object org.mmbase.util.PasswordGenerator
PasswordGenerator | public class PasswordGenerator implements PasswordGeneratorInterface(Code) | | Module for the automatic generation of passwords.
Based on the code of Arnold G. Reinhold, Cambridge, MA, USA.
This code is under the GNU License as specified by the original author.
The passwords generated by this class are based on a template.
A template can exists of a number of characters, which are replaced by
the generator as follows:
A : is replaced by a random letter (a - z).
C : is replaced by a random alphanumeric character (0-9, a-z)
H : is replaced by a random hex character (0-9,A-F)
S : is replaced by a random syllable. This, alterating, an element from a set of
consonants or an element form a set of vowels. A syllable can be more than
one character (i.e. "qu").
6 : is replaced by a random dice-roll (1-6)
9 : is replaced by a random digit (0-9)
author: Rico Jansen author: Pierre van Rooden (javadocs) version: $Id: PasswordGenerator.java,v 1.13 2007/10/26 11:09:55 michiel Exp $ |
Method Summary | |
public String | getModuleInfo() Returns a description of the module. | public String | getPassword() Generate a password, based on the default template for this module. | public String | getPassword(String template) Generate a password, based on the given template.
Parameters: template - the template the password should be based on. | public static void | main(String args) Entry point when calling from teh command line. |
defaulttemplate | String defaulttemplate(Code) | | Default template to use when generating passwords.
|
PasswordGenerator | public PasswordGenerator()(Code) | | Creates the generator
|
getModuleInfo | public String getModuleInfo()(Code) | | Returns a description of the module.
|
getPassword | public String getPassword()(Code) | | Generate a password, based on the default template for this module.
the generated password. |
getPassword | public String getPassword(String template)(Code) | | Generate a password, based on the given template.
Parameters: template - the template the password should be based on. the generated password. |
main | public static void main(String args)(Code) | | Entry point when calling from teh command line.
Used for testing.
|
|
|