Class PrivateKeyHolderFactory
- java.lang.Object
-
- com.adobe.internal.pdftoolkit.core.credentials.PrivateKeyHolderFactory
-
public class PrivateKeyHolderFactory extends java.lang.ObjectPrivateKeyHolderFactory 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 PrivateKeyHoldercreatePrivateKey(byte[] derEncodedPrivateKey, java.lang.String algorithm)Creates a PrivateKeyHolder containing bytes representing the DER encoded PKCS8 unencrypted private key and the key wrapping format.PrivateKeyHoldercreatePrivateKey(java.security.PrivateKey privateKey, java.lang.String providerName)Creates a PrivateKeyHolder that contains a JCE PrivateKey and a provider name.static PrivateKeyHolderFactorynewInstance()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, java.lang.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(java.security.PrivateKey privateKey, java.lang.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
-
-