Class PrivateKeyHolderFactory
- java.lang.Object
-
- com.adobe.internal.pdftoolkit.core.credentials.PrivateKeyHolderFactory
-
public class PrivateKeyHolderFactory extends Object
PrivateKeyHolderFactory creates a PrivateKey that can be used to create the appropriate Gibson Credentials. PrivateKeys can be constructed from a set of bytes representing the key and the key wrapping format, or can be an HSM private key that contains a JSAFE Session Spec and a JSAFEPrivate key, or a JCE private key. *
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PrivateKeyHolder
createPrivateKey(byte[] derEncodedPrivateKey, String algorithm)
Creates a PrivateKeyHolder containing bytes representing the DER encoded PKCS8 unencrypted private key and the key wrapping format.PrivateKeyHolder
createPrivateKey(PrivateKey privateKey, String providerName)
Creates a PrivateKeyHolder that contains a JCE PrivateKey and a provider name.static PrivateKeyHolderFactory
newInstance()
Creates a new instance of the PrivateKeyHolderFactory.
-
-
-
Method Detail
-
newInstance
public static PrivateKeyHolderFactory newInstance()
Creates a new instance of the PrivateKeyHolderFactory.
-
createPrivateKey
public PrivateKeyHolder createPrivateKey(byte[] derEncodedPrivateKey, String algorithm)
Creates a PrivateKeyHolder containing bytes representing the DER encoded PKCS8 unencrypted private key and the key wrapping format.- Parameters:
derEncodedPrivateKey
-algorithm
- - representing the wrapping format of the key - RSA/DSA- Returns:
- PrivateKeyHolder
-
createPrivateKey
public PrivateKeyHolder createPrivateKey(PrivateKey privateKey, String providerName)
Creates a PrivateKeyHolder that contains a JCE PrivateKey and a provider name.- Parameters:
privateKey
-providerName
- (Optional) Pass in if HSM provider or a specific provider has the private key- Returns:
- PrivateKeyHolder
-
-