Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.lucane.common.signature
Class KeyManager  view KeyManager download KeyManager.java

java.lang.Object
  extended byorg.lucane.common.signature.KeyManager

class KeyManager
extends java.lang.Object

Tool class for managing keys


Constructor Summary
(package private) KeyManager()
           
 
Method Summary
static java.security.KeyPair generateNewKeyPair()
          Generate a new KeyPair
static java.security.PrivateKey readPrivateKeyFromFile(java.lang.String filename)
          Loads a PrivateKey from a file
static java.security.PublicKey readPublicKeyFromFile(java.lang.String filename)
          Loads a publicKey from a file
static void writeKeyToFile(java.security.Key key, java.lang.String filename)
          Save the Key to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyManager

KeyManager()
Method Detail

generateNewKeyPair

public static java.security.KeyPair generateNewKeyPair()
                                                throws java.security.GeneralSecurityException
Generate a new KeyPair


writeKeyToFile

public static void writeKeyToFile(java.security.Key key,
                                  java.lang.String filename)
                           throws java.io.IOException
Save the Key to a file.


readPublicKeyFromFile

public static java.security.PublicKey readPublicKeyFromFile(java.lang.String filename)
                                                     throws java.io.IOException,
                                                            java.security.GeneralSecurityException
Loads a publicKey from a file


readPrivateKeyFromFile

public static java.security.PrivateKey readPrivateKeyFromFile(java.lang.String filename)
                                                       throws java.io.IOException,
                                                              java.security.GeneralSecurityException
Loads a PrivateKey from a file