com.mindbright.jca.security
Class KeyFactory
java.lang.Object
com.mindbright.jca.security.KeyFactory
public class KeyFactory
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeyFactory
protected KeyFactory(KeyFactorySpi keyFactorySpi,
Provider provider,
java.lang.String algorithm)
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