Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mozilla.jss.provider.java.security
Class KeyFactorySpi1_2

    java.lang.Object
      |
      +--java.security.KeyFactorySpi
            |
            +--org.mozilla.jss.provider.java.security.KeyFactorySpi1_2

Direct Known Subclasses:
  KeyFactorySpi1_4

public class KeyFactorySpi1_2
extends java.security.KeyFactorySpi

Constructor Summary
`KeyFactorySpi1_2()`

Method Summary
`protected java.security.PrivateKey` | `engineGeneratePrivate(java.security.spec.KeySpec keySpec)` We don't support RSAPrivateKeySpec because it doesn't have enough information.
`protected java.security.PublicKey` | `engineGeneratePublic(java.security.spec.KeySpec keySpec)`
`protected java.security.spec.KeySpec` | `engineGetKeySpec(java.security.Key key, java.lang.Class keySpec)`
`protected java.security.Key` | `engineTranslateKey(java.security.Key key)` Translates key by calling getEncoded() to get its encoded form, then importing the key from its encoding.

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

Constructor Detail

### KeyFactorySpi1_2

    public KeyFactorySpi1_2()

Method Detail

### engineGeneratePublic

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

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

### engineGeneratePrivate

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

  We don't support RSAPrivateKeySpec because it doesn't have enough information. You need to provide an RSAPrivateCrtKeySpec.

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

### engineGetKeySpec

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

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

### engineTranslateKey

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

  Translates key by calling getEncoded() to get its encoded form, then importing the key from its encoding. Two formats are supported: "SubjectPublicKeyInfo", which is decoded with an X509EncodedKeySpec; and "PrivateKeyInfo", which is decoded with a PKCS8EncodedKeySpec.

  This method is not well standardized: the documentation is very vague about how the key is supposed to be translated. It is better to move keys around by wrapping and unwrapping them; or by manually translating to a KeySpec, then manually translating back to a Key.

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

Overview | Package | Class | Tree | Deprecated | Index | Help
| JSS 3.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD