org.apache.commons.ssl.util
Class PublicKeyDeriver

java.lang.Object
  extended by org.apache.commons.ssl.util.PublicKeyDeriver

public class PublicKeyDeriver
extends java.lang.Object

Utility class for deriving a public key from a given private key.

Since:
November 14th, 2007
Author:
Chad La Joie

Constructor Summary
PublicKeyDeriver()
           
 
Method Summary
static java.security.PublicKey derivePublicKey(java.security.PrivateKey key)
          Utility method for deriving a public key from a given private key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublicKeyDeriver

public PublicKeyDeriver()
Method Detail

derivePublicKey

public static java.security.PublicKey derivePublicKey(java.security.PrivateKey key)
                                               throws java.security.GeneralSecurityException
Utility method for deriving a public key from a given private key.

Parameters:
key - private key for which we need a public key (DSA or RSA).
Returns:
the corresponding public key
Throws:
java.security.GeneralSecurityException - if it didn't work