Class PrivateKeyHolderFactory
java.lang.Object
com.adobe.internal.pdftoolkit.core.credentials.PrivateKeyHolderFactory
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
Modifier and TypeMethodDescriptioncreatePrivateKey(byte[] derEncodedPrivateKey, String algorithm) Creates a PrivateKeyHolder containing bytes representing the DER encoded PKCS8 unencrypted private key and the key wrapping format.createPrivateKey(PrivateKey privateKey, String providerName) Creates a PrivateKeyHolder that contains a JCE PrivateKey and a provider name.static PrivateKeyHolderFactoryCreates a new instance of the PrivateKeyHolderFactory.
-
Method Details
-
newInstance
Creates a new instance of the PrivateKeyHolderFactory. -
createPrivateKey
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
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
-