cryptix.examples.pgp
Class KeyGen
java.lang.Object
|
+--cryptix.examples.pgp.KeyGen
- All Implemented Interfaces:
- RSAKeyGenObserver, TestPrimeObserver
- Direct Known Subclasses:
- VanityKeyGen
- class KeyGen
- extends java.lang.Object
- implements RSAKeyGenObserver
DOCUMENT ME.
SECURITY: this should not be public, since it writes to "pubring.pgp" and
"secring.pgp".
Field Summary |
protected java.io.DataInputStream |
in
|
protected java.io.PrintStream |
out
|
Constructor Summary |
KeyGen()
|
KeyGen(java.io.InputStream in,
java.io.PrintStream out)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
protected java.io.DataInputStream in
out
protected java.io.PrintStream out
KeyGen
public KeyGen(java.io.InputStream in,
java.io.PrintStream out)
KeyGen
public KeyGen()
main
public static void main(java.lang.String[] args)
begin
protected final void begin()
getKey
protected SecretKey getKey(int length,
RandomStream rs)
getUserName
protected java.lang.String getUserName()
throws java.io.IOException
getKeyLength
protected int getKeyLength()
throws java.io.IOException
getRandomStream
protected RandomStream getRandomStream(int keyLength)
throws java.io.IOException
- This is NOT VERY SECURE as the seed is rather simplistic.
getPassphrase
protected java.lang.String getPassphrase()
throws java.io.IOException
- WARNING this prints the passphrase out on to the screen.
handleEvent
public void handleEvent(int evnt)
- Specified by:
handleEvent
in interface TestPrimeObserver