Top Description Fields Constructors Methods
org.bouncycastle.asn1.cms

public Class KeyAgreeRecipientInfo

extends ASN1Object
Class Inheritance
Imports
org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1OctetString, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .DERSequence, .DERTaggedObject, org.bouncycastle.asn1.x509.AlgorithmIdentifier

RFC 5652: Content encryption key delivery mechanisms.

KeyAgreeRecipientInfo ::= SEQUENCE {
    version CMSVersion,  -- always set to 3
    originator [0] EXPLICIT OriginatorIdentifierOrKey,
    ukm [1] EXPLICIT UserKeyingMaterial OPTIONAL,
    keyEncryptionAlgorithm KeyEncryptionAlgorithmIdentifier,
    recipientEncryptedKeys RecipientEncryptedKeys 
}

UserKeyingMaterial ::= OCTET STRING

Field Summary

Modifier and TypeField and Description
private AlgorithmIdentifier
private OriginatorIdentifierOrKey
private ASN1Sequence
private ASN1OctetString
private ASN1Integer

Constructor Summary

AccessConstructor and Description
public
KeyAgreeRecipientInfo(OriginatorIdentifierOrKey originator, ASN1OctetString ukm, AlgorithmIdentifier keyEncryptionAlgorithm, ASN1Sequence recipientEncryptedKeys)

private

Method Summary

Modifier and TypeMethod and Description
public static KeyAgreeRecipientInfo
getInstance(ASN1TaggedObject
the tagged object holding the object we want.
obj
,
boolean
true if the object is meant to be explicitly tagged false otherwise.
explicit
)

Return a KeyAgreeRecipientInfo object from a tagged object.

public static KeyAgreeRecipientInfo
getInstance(Object
the object we want converted.
obj
)

Return a KeyAgreeRecipientInfo object from the given object.

public AlgorithmIdentifier
public OriginatorIdentifierOrKey
public ASN1Sequence
public ASN1OctetString
public ASN1Integer
public ASN1Primitive
toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.
Inherited from org.bouncycastle.asn1.ASN1Object:
equalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

keyEncryptionAlgorithmback to summary
private AlgorithmIdentifier keyEncryptionAlgorithm
originatorback to summary
private OriginatorIdentifierOrKey originator
recipientEncryptedKeysback to summary
private ASN1Sequence recipientEncryptedKeys
ukmback to summary
private ASN1OctetString ukm
versionback to summary
private ASN1Integer version

Constructor Detail

KeyAgreeRecipientInfoback to summary
public KeyAgreeRecipientInfo(OriginatorIdentifierOrKey originator, ASN1OctetString ukm, AlgorithmIdentifier keyEncryptionAlgorithm, ASN1Sequence recipientEncryptedKeys)
KeyAgreeRecipientInfoback to summary
private KeyAgreeRecipientInfo(ASN1Sequence seq)

Method Detail

getInstanceback to summary
public static KeyAgreeRecipientInfo getInstance(ASN1TaggedObject obj, boolean explicit)

Return a KeyAgreeRecipientInfo object from a tagged object.

Parameters
obj:ASN1TaggedObject

the tagged object holding the object we want.

explicit:boolean

true if the object is meant to be explicitly tagged false otherwise.

Exceptions
IllegalArgumentException:
if the object held by the tagged object cannot be converted.
getInstanceback to summary
public static KeyAgreeRecipientInfo getInstance(Object obj)

Return a KeyAgreeRecipientInfo object from the given object.

Accepted inputs:

Parameters
obj:Object

the object we want converted.

Exceptions
IllegalArgumentException:
if the object cannot be converted.
getKeyEncryptionAlgorithmback to summary
public AlgorithmIdentifier getKeyEncryptionAlgorithm()
getOriginatorback to summary
public OriginatorIdentifierOrKey getOriginator()
getRecipientEncryptedKeysback to summary
public ASN1Sequence getRecipientEncryptedKeys()
getUserKeyingMaterialback to summary
public ASN1OctetString getUserKeyingMaterial()
getVersionback to summary
public ASN1Integer getVersion()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.

Returns:ASN1Primitive

Doc from org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

a primitive representation of this object.