|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.mmbase.module.Module
|
+--org.mmbase.util.PasswordGenerator
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)
| Constructor Summary | |
PasswordGenerator()
Creates the generator |
|
| Method Summary | |
java.lang.String |
getModuleInfo()
Returns a description of the module. |
java.lang.String |
getPassword()
Generate a password, based on the default template for this module. |
java.lang.String |
getPassword(java.lang.String template)
Generate a password, based on the given template. |
void |
init()
Initializes the module. |
static void |
main(java.lang.String[] args)
Entry point when calling from teh command line. |
void |
onload()
Called when the module is loaded. |
void |
reload()
Called when the module is reloaded. |
void |
shutdown()
Called when the module is shut down (removed). |
void |
unload()
Called when the module is unloaded. |
| Methods inherited from class org.mmbase.module.Module |
getClassName, getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, maintainance, setClassName, setInitParameter, setMaintainer, setName, setVersion, shutdownModules, startModule, startModules, state |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PasswordGenerator()
| Method Detail |
public void onload()
onload in class Modulepublic void reload()
public void init()
init in class Modulepublic void unload()
public void shutdown()
shutdown in class Modulepublic static void main(java.lang.String[] args)
public java.lang.String getPassword()
getPassword in interface PasswordGeneratorInterfacepublic java.lang.String getPassword(java.lang.String template)
getPassword in interface PasswordGeneratorInterfacetemplate - the template the password should be based on.public java.lang.String getModuleInfo()
getModuleInfo in class Module
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||