net.goui.util
Class GPWData

java.lang.Object
  extended bynet.goui.util.GPWData

public final class GPWData
extends java.lang.Object

Version:
1.0
Author:
David Beaumont, Copyright 2005

This class is a derived work based upon an original implementation by Tom Van Vleck which can be found at http://www.multicians.org/thvv/gpw.html.

This static class can be used to generate pronounceable passwords. Currently it only produced English style passwords and a different set of data tables will be required for other languages. New data tables can be generated using the "loadtris" program which can also be found at http://www.multicians.org/thvv/gpw.html

However,in order to overcome the Java restriction that static arrays cannot exceed 64k in size, any trailing sequences of zeros should be removed and any arrays containing only zeros should be replaced by a null value.

CC-GNU LGPL
This software is licensed under the CC-GNU LGPL.


Constructor Summary
GPWData()
           
 
Method Summary
static void generate(byte[] buf, java.util.Random ran)
          This methid simply fills a given byte array with numerical values corresponding to characters in order to form a pronounceable password.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPWData

public GPWData()
Method Detail

generate

public static void generate(byte[] buf,
                            java.util.Random ran)
This methid simply fills a given byte array with numerical values corresponding to characters in order to form a pronounceable password. The values in this byte array must be converted into characters before they can be represented in a string. The byte values in this array are simply values in the range [0-25] and not ASCII character values.

This approach means that it is up to the caller of this method to decide about whether or not the characters which make up the final password should be upper or lower case.

Parameters:
buf - The byte array into which the password data should be put
ran - A random number generator used to construct the password data