public abstract class KeyAgreeRecipientInfoGenerator extends java.lang.Object implements RecipientInfoGenerator
| Modifier | Constructor and Description |
|---|---|
protected |
KeyAgreeRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier keyAgreementOID,
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo originatorKeyInfo,
org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionOID) |
| Modifier and Type | Method and Description |
|---|---|
protected org.bouncycastle.asn1.cms.OriginatorPublicKey |
createOriginatorPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo originatorKeyInfo) |
org.bouncycastle.asn1.cms.RecipientInfo |
generate(GenericKey contentEncryptionKey) |
protected abstract org.bouncycastle.asn1.ASN1Sequence |
generateRecipientEncryptedKeys(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm,
org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncAlgorithm,
GenericKey contentEncryptionKey) |
protected void |
generationComplete()
Called at the end of every
generate(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). |
protected abstract byte[] |
getUserKeyingMaterial(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm) |
protected boolean |
isEC(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) |
protected boolean |
isGOST(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) |
protected boolean |
isHKDF(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) |
protected boolean |
isMQV(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) |
protected boolean |
isRFC2631(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID) |
protected KeyAgreeRecipientInfoGenerator(org.bouncycastle.asn1.ASN1ObjectIdentifier keyAgreementOID,
org.bouncycastle.asn1.x509.SubjectPublicKeyInfo originatorKeyInfo,
org.bouncycastle.asn1.ASN1ObjectIdentifier keyEncryptionOID)
public org.bouncycastle.asn1.cms.RecipientInfo generate(GenericKey contentEncryptionKey) throws CMSException
generate in interface RecipientInfoGeneratorCMSExceptionprotected org.bouncycastle.asn1.cms.OriginatorPublicKey createOriginatorPublicKey(org.bouncycastle.asn1.x509.SubjectPublicKeyInfo originatorKeyInfo)
protected boolean isEC(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID)
protected boolean isHKDF(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID)
protected boolean isMQV(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID)
protected boolean isRFC2631(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID)
protected boolean isGOST(org.bouncycastle.asn1.ASN1ObjectIdentifier algorithmOID)
protected abstract org.bouncycastle.asn1.ASN1Sequence generateRecipientEncryptedKeys(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm,
org.bouncycastle.asn1.x509.AlgorithmIdentifier keyEncAlgorithm,
GenericKey contentEncryptionKey)
throws CMSException
CMSExceptionprotected abstract byte[] getUserKeyingMaterial(org.bouncycastle.asn1.x509.AlgorithmIdentifier keyAgreeAlgorithm)
throws CMSException
CMSExceptionprotected void generationComplete()
generate(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.