com.mindbright.jca.security
Class KeyFactory

java.lang.Object
  extended by com.mindbright.jca.security.KeyFactory

public class KeyFactory
extends java.lang.Object


Constructor Summary
protected KeyFactory(KeyFactorySpi keyFactorySpi, Provider provider, java.lang.String algorithm)
           
 
Method Summary
 PrivateKey generatePrivate(KeySpec keySpec)
           
 PublicKey generatePublic(KeySpec keySpec)
           
 java.lang.String getAlgorithm()
           
static KeyFactory getInstance(java.lang.String algorithm)
           
static KeyFactory getInstance(java.lang.String algorithm, java.lang.String provider)
           
 KeySpec getKeySpec(Key key, java.lang.Class keySpec)
           
 Provider getProvider()
           
 Key translateKey(Key key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyFactory

protected KeyFactory(KeyFactorySpi keyFactorySpi,
                     Provider provider,
                     java.lang.String algorithm)
Method Detail

getInstance

public static KeyFactory getInstance(java.lang.String algorithm)
                              throws NoSuchAlgorithmException
Throws:
NoSuchAlgorithmException

getInstance

public static KeyFactory getInstance(java.lang.String algorithm,
                                     java.lang.String provider)
                              throws NoSuchAlgorithmException,
                                     NoSuchProviderException
Throws:
NoSuchAlgorithmException
NoSuchProviderException

getProvider

public final Provider getProvider()

getAlgorithm

public final java.lang.String getAlgorithm()

generatePublic

public final PublicKey generatePublic(KeySpec keySpec)
                               throws InvalidKeySpecException
Throws:
InvalidKeySpecException

generatePrivate

public final PrivateKey generatePrivate(KeySpec keySpec)
                                 throws InvalidKeySpecException
Throws:
InvalidKeySpecException

getKeySpec

public final KeySpec getKeySpec(Key key,
                                java.lang.Class keySpec)
                         throws InvalidKeySpecException
Throws:
InvalidKeySpecException

translateKey

public final Key translateKey(Key key)
                       throws InvalidKeyException
Throws:
InvalidKeyException