KeyFactorySpi (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.jcajce.provider.asymmetric.dh

## Class KeyFactorySpi

- java.lang.Object
- - java.security.KeyFactorySpi
  - - org.bouncycastle.jcajce.provider.asymmetric.util.BaseKeyFactorySpi
    - - org.bouncycastle.jcajce.provider.asymmetric.dh.KeyFactorySpi

- All Implemented Interfaces:
    AsymmetricKeyInfoConverter

      public class KeyFactorySpi
      extends BaseKeyFactorySpi

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeyFactorySpi()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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)`
    `java.security.PrivateKey` | `generatePrivate(PrivateKeyInfo keyInfo)`
    `java.security.PublicKey` | `generatePublic(SubjectPublicKeyInfo keyInfo)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KeyFactorySpi

          public KeyFactorySpi()

  - ### Method Detail

    - #### engineGetKeySpec

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

      Overrides:
        `engineGetKeySpec` in class `BaseKeyFactorySpi`
      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`

    - #### engineGeneratePrivate

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

      Overrides:
        `engineGeneratePrivate` in class `BaseKeyFactorySpi`
      Throws:
        `java.security.spec.InvalidKeySpecException`

    - #### engineGeneratePublic

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

      Overrides:
        `engineGeneratePublic` in class `BaseKeyFactorySpi`
      Throws:
        `java.security.spec.InvalidKeySpecException`

    - #### generatePrivate

          public java.security.PrivateKey generatePrivate(PrivateKeyInfo keyInfo)
                                                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### generatePublic

          public java.security.PublicKey generatePublic(SubjectPublicKeyInfo keyInfo)
                                                 throws java.io.IOException

      Throws:
        `java.io.IOException`