Bouncy Castle Cryptography Library 1.45

## org.bouncycastle.jce.provider
Class JDKKeyFactory

    java.lang.Object
      java.security.KeyFactorySpi
          org.bouncycastle.jce.provider.JDKKeyFactory

Direct Known Subclasses:
  JDKKeyFactory.DH, JDKKeyFactory.DSA, JDKKeyFactory.ElGamal, JDKKeyFactory.GOST3410, JDKKeyFactory.RSA, JDKKeyFactory.X509, KeyFactory

    public abstract class JDKKeyFactory

extends java.security.KeyFactorySpi

Nested Class Summary
`static class` `JDKKeyFactory.DH`
`static class` `JDKKeyFactory.DSA`
`static class` `JDKKeyFactory.ElGamal`
`static class` `JDKKeyFactory.GOST3410`
`static class` `JDKKeyFactory.RSA`
`static class` `JDKKeyFactory.X509` This isn't really correct, however the class path project API seems to think such a key factory will exist.

Field Summary
`protected boolean` `elGamalFactory`

Constructor Summary
`JDKKeyFactory()`

Method Summary
`protected static java.security.PrivateKey` `createPrivateKeyFromDERStream(byte[] in)` create a private key from the given DER encoded input stream.
`static java.security.PublicKey` `createPublicKeyFromDERStream(byte[] in)` create a public key from the given DER encoded input stream.
`protected java.security.PrivateKey` `engineGeneratePrivate(java.security.spec.KeySpec keySpec)`
`protected java.security.PublicKey` `engineGeneratePublic(java.security.spec.KeySpec keySpec)`
`protected java.security.spec.KeySpec` `engineGetKeySpec(java.security.Key key, java.lang.Class spec)`
`protected java.security.Key` `engineTranslateKey(java.security.Key key)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### elGamalFactory

    protected boolean elGamalFactory

Constructor Detail

### JDKKeyFactory

    public JDKKeyFactory()

Method Detail

### engineGeneratePrivate

    protected java.security.PrivateKey engineGeneratePrivate(java.security.spec.KeySpec keySpec)
                                                      throws java.security.spec.InvalidKeySpecException

  Specified by:
    `engineGeneratePrivate` in class `java.security.KeyFactorySpi`
  Throws:
    `java.security.spec.InvalidKeySpecException`

### engineGeneratePublic

    protected java.security.PublicKey engineGeneratePublic(java.security.spec.KeySpec keySpec)
                                                    throws java.security.spec.InvalidKeySpecException

  Specified by:
    `engineGeneratePublic` in class `java.security.KeyFactorySpi`
  Throws:
    `java.security.spec.InvalidKeySpecException`

### engineGetKeySpec

    protected java.security.spec.KeySpec engineGetKeySpec(java.security.Key key,
                                                          java.lang.Class spec)
                                                   throws java.security.spec.InvalidKeySpecException

  Specified by:
    `engineGetKeySpec` in class `java.security.KeyFactorySpi`
  Throws:
    `java.security.spec.InvalidKeySpecException`

### engineTranslateKey

    protected java.security.Key engineTranslateKey(java.security.Key key)
                                            throws java.security.InvalidKeyException

  Specified by:
    `engineTranslateKey` in class `java.security.KeyFactorySpi`
  Throws:
    `java.security.InvalidKeyException`

### createPublicKeyFromDERStream

    public static java.security.PublicKey createPublicKeyFromDERStream(byte[] in)
                                                                throws java.io.IOException

  create a public key from the given DER encoded input stream.

  Throws:
    `java.io.IOException`

### createPrivateKeyFromDERStream

    protected static java.security.PrivateKey createPrivateKeyFromDERStream(byte[] in)
                                                                     throws java.io.IOException

  create a private key from the given DER encoded input stream.

  Throws:
    `java.io.IOException`

Bouncy Castle Cryptography Library 1.45