|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--endtoend.KeyGen
Generates a new set of random public and private key pair. Yet to be released. Stay tuned.
Constructor Summary | |
KeyGen(int keylen)
Takes in a configurable key length. |
Method Summary | |
java.lang.String |
getPublicKey()
Returns the public key in base64 format. |
static void |
main(java.lang.String[] argc)
Usage: java endtoend.KeyGen <public key file> <private key file> <password> Key strength is set at 1024 bits. |
void |
writePrivateKey(java.lang.String path,
java.lang.String pass)
Output the encrypted private key to a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KeyGen(int keylen)
A key length of 1024 is safe (for now).
keylen
- number of bits in the public/private keyMethod Detail |
public static void main(java.lang.String[] argc)
Key strength is set at 1024 bits.
The two files generated are in base64 format.
public void writePrivateKey(java.lang.String path, java.lang.String pass) throws java.io.IOException
path
- private key file namepass
- password to lock the private key
java.io.IOException
getPublicKey()
public java.lang.String getPublicKey()
writePrivateKey(java.lang.String, java.lang.String)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |