public class JceAsymmetricKeyUnwrapper extends AsymmetricKeyUnwrapper
| Constructor and Description |
|---|
JceAsymmetricKeyUnwrapper(AlgorithmIdentifier algorithmIdentifier,
PrivateKey privKey) |
| Modifier and Type | Method and Description |
|---|---|
GenericKey |
generateUnwrappedKey(AlgorithmIdentifier encryptedKeyAlgorithm,
byte[] encryptedKey) |
JceAsymmetricKeyUnwrapper |
setAlgorithmMapping(ASN1ObjectIdentifier algorithm,
String algorithmName)
Internally algorithm ids are converted into cipher names using a lookup table.
|
JceAsymmetricKeyUnwrapper |
setMustProduceEncodableUnwrappedKey(boolean unwrappedKeyMustBeEncodable)
Flag that unwrapping must produce a key that will return a meaningful value from a call to Key.getEncoded().
|
JceAsymmetricKeyUnwrapper |
setProvider(Provider provider) |
JceAsymmetricKeyUnwrapper |
setProvider(String providerName) |
getAlgorithmIdentifierpublic JceAsymmetricKeyUnwrapper(AlgorithmIdentifier algorithmIdentifier, PrivateKey privKey)
public JceAsymmetricKeyUnwrapper setProvider(Provider provider)
public JceAsymmetricKeyUnwrapper setProvider(String providerName)
public JceAsymmetricKeyUnwrapper setMustProduceEncodableUnwrappedKey(boolean unwrappedKeyMustBeEncodable)
unwrappedKeyMustBeEncodable - true if getEncoded() should return key bytes, false if not necessary.public JceAsymmetricKeyUnwrapper setAlgorithmMapping(ASN1ObjectIdentifier algorithm, String algorithmName)
For example:
unwrapper.setAlgorithmMapping(PKCSObjectIdentifiers.rsaEncryption, "RSA");
algorithm - OID of algorithm in recipient.algorithmName - JCE algorithm name to use.public GenericKey generateUnwrappedKey(AlgorithmIdentifier encryptedKeyAlgorithm, byte[] encryptedKey) throws OperatorException
OperatorExceptionCopyright © 2015–2020 The veraPDF Consortium. All rights reserved.