Class KeyAgreeRecipientInfoGenerator
java.lang.Object
org.bouncycastle.cms.KeyAgreeRecipientInfoGenerator
- All Implemented Interfaces:
RecipientInfoGenerator
- Direct Known Subclasses:
JceKeyAgreeRecipientInfoGenerator
public abstract class KeyAgreeRecipientInfoGenerator
extends Object
implements RecipientInfoGenerator
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedKeyAgreeRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier keyAgreementOID, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo originatorKeyInfo, org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionOID) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.bouncycastle.asn1.cms.OriginatorPublicKeycreateOriginatorPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo originatorKeyInfo) org.bouncycastle.asn1.cms.RecipientInfogenerate(GenericKey contentEncryptionKey) protected abstract org.bouncycastle.asn1.ASN1SequencegenerateRecipientEncryptedKeys(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm, org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncAlgorithm, GenericKey contentEncryptionKey) protected voidCalled at the end of everygenerate(GenericKey), whether it completed normally or not, so a subclass can release any state it holds for the duration of a single KeyAgreeRecipientInfo (e.g.protected abstract byte[]getUserKeyingMaterial(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm) protected booleanisEC(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) protected booleanisGOST(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) protected booleanisHKDF(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) protected booleanisMQV(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) protected booleanisRFC2631(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID)
-
Constructor Details
-
KeyAgreeRecipientInfoGenerator
protected KeyAgreeRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier keyAgreementOID, org.bouncycastle.asn1.x509.SubjectPublicKeyInfo originatorKeyInfo, org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionOID)
-
-
Method Details
-
generate
public org.bouncycastle.asn1.cms.RecipientInfo generate(GenericKey contentEncryptionKey) throws CMSException - Specified by:
generatein interfaceRecipientInfoGenerator- Throws:
CMSException
-
createOriginatorPublicKey
protected org.bouncycastle.asn1.cms.OriginatorPublicKey createOriginatorPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo originatorKeyInfo) -
isEC
protected boolean isEC(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) -
isHKDF
protected boolean isHKDF(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) -
isMQV
protected boolean isMQV(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) -
isRFC2631
protected boolean isRFC2631(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) -
isGOST
protected boolean isGOST(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) -
generateRecipientEncryptedKeys
protected abstract org.bouncycastle.asn1.ASN1Sequence generateRecipientEncryptedKeys(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm, org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncAlgorithm, GenericKey contentEncryptionKey) throws CMSException - Throws:
CMSException
-
getUserKeyingMaterial
protected abstract byte[] getUserKeyingMaterial(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm) throws CMSException - Throws:
CMSException
-
generationComplete
protected void generationComplete()Called at the end of everygenerate(GenericKey), whether it completed normally or not, so a subclass can release any state it holds for the duration of a single KeyAgreeRecipientInfo (e.g. an ephemeral key pair). The default implementation does nothing.This is called from a finally block, so an implementation must not throw: an exception thrown here would replace the result, or the exception, of the generate call.
-