|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.cms.AbstractRecipient
org.bouncycastle.cms.AbstractKeyTransRecipient
org.bouncycastle.cms.jcajce.JceKeyTransRecipient
| Field Summary | |
protected EnvelopedDataHelper |
contentHelper
|
protected java.util.Map |
extraMappings
|
protected EnvelopedDataHelper |
helper
|
protected boolean |
unwrappedKeyMustBeEncodable
|
protected boolean |
validateKeySize
|
| Constructor Summary | |
JceKeyTransRecipient(java.security.PrivateKey recipientKey)
|
|
| Method Summary | |
protected java.security.Key |
extractSecretKey(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm,
org.bouncycastle.asn1.x509.AlgorithmIdentifier encryptedKeyAlgorithm,
byte[] encryptedEncryptionKey)
|
JceKeyTransRecipient |
setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm,
java.lang.String algorithmName)
Internally algorithm ids are converted into cipher names using a lookup table. |
JceKeyTransRecipient |
setAllowedContentAlgorithms(java.util.Set allowedContentAlgorithms)
Set the content-encryption algorithms this recipient is willing to unwrap a key for. |
JceKeyTransRecipient |
setContentProvider(java.security.Provider provider)
Set the provider to use for content processing. |
JceKeyTransRecipient |
setContentProvider(java.lang.String providerName)
Set the provider to use for content processing. |
JceKeyTransRecipient |
setKeySizeValidation(boolean doValidate)
Set validation of retrieved key sizes against the algorithm parameters for the encrypted key where possible - default is off. |
JceKeyTransRecipient |
setMinimumTagSize(int tagSizeInBits)
Set the minimum AEAD authentication tag size (in bits) this recipient will accept. |
JceKeyTransRecipient |
setMustProduceEncodableUnwrappedKey(boolean unwrappedKeyMustBeEncodable)
Flag that unwrapping must produce a key that will return a meaningful value from a call to Key.getEncoded(). |
JceKeyTransRecipient |
setProvider(java.security.Provider provider)
Set the provider to use for key recovery and content processing. |
JceKeyTransRecipient |
setProvider(java.lang.String providerName)
Set the provider to use for key recovery and content processing. |
| Methods inherited from class org.bouncycastle.cms.AbstractKeyTransRecipient |
isGOST |
| Methods inherited from class org.bouncycastle.cms.AbstractRecipient |
checkTagSize, isContentAlgorithmAllowed, setAllowedContentAlgorithmSet, setMinimumTagSizeInBits |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.bouncycastle.cms.KeyTransRecipient |
getRecipientOperator |
| Field Detail |
protected EnvelopedDataHelper helper
protected EnvelopedDataHelper contentHelper
protected java.util.Map extraMappings
protected boolean validateKeySize
protected boolean unwrappedKeyMustBeEncodable
| Constructor Detail |
public JceKeyTransRecipient(java.security.PrivateKey recipientKey)
| Method Detail |
public JceKeyTransRecipient setProvider(java.security.Provider provider)
provider - provider to use.
public JceKeyTransRecipient setProvider(java.lang.String providerName)
providerName - the name of the provider to use.
public JceKeyTransRecipient setAlgorithmMapping(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithm,
java.lang.String algorithmName)
For example: unwrapper.setAlgorithmMapping(PKCSObjectIdentifiers.rsaEncryption, "RSA");
algorithm - OID of algorithm in recipient.algorithmName - JCE algorithm name to use.
public JceKeyTransRecipient setContentProvider(java.security.Provider provider)
provider - the provider to use.
public JceKeyTransRecipient setContentProvider(java.lang.String providerName)
providerName - the name of the provider to use.
public JceKeyTransRecipient setMustProduceEncodableUnwrappedKey(boolean unwrappedKeyMustBeEncodable)
unwrappedKeyMustBeEncodable - true if getEncoded() should return key bytes, false if not necessary.
public JceKeyTransRecipient setKeySizeValidation(boolean doValidate)
This setting will not have any affect if the encryption algorithm in the recipient does not specify a particular key size, or if the unwrapper is a HSM and the byte encoding of the unwrapped secret key is not available.
doValidate - true if unwrapped key's should be validated against the content encryption algorithm, false otherwise.
public JceKeyTransRecipient setAllowedContentAlgorithms(java.util.Set allowedContentAlgorithms)
allowedContentAlgorithms - the set of permitted content-encryption algorithm OIDs.
public JceKeyTransRecipient setMinimumTagSize(int tagSizeInBits)
tagSizeInBits - the minimum acceptable AEAD tag size, in bits.
protected java.security.Key extractSecretKey(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncryptionAlgorithm,
org.bouncycastle.asn1.x509.AlgorithmIdentifier encryptedKeyAlgorithm,
byte[] encryptedEncryptionKey)
throws CMSException
CMSException
|
Bouncy Castle Cryptography Library 1.85 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||