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

public Class RecipientEncryptedKey

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

RFC 5652: Content encryption key delivery mechanisms.
RecipientEncryptedKey ::= SEQUENCE {
    rid KeyAgreeRecipientIdentifier,
    encryptedKey EncryptedKey
}

Field Summary

Modifier and TypeField and Description
private ASN1OctetString
private KeyAgreeRecipientIdentifier

Constructor Summary

AccessConstructor and Description
private
public

Method Summary

Modifier and TypeMethod and Description
public ASN1OctetString
public KeyAgreeRecipientIdentifier
public static RecipientEncryptedKey
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 an RecipientEncryptedKey object from a tagged object.

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

Return a RecipientEncryptedKey object from the given object.

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:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

encryptedKeyback to summary
private ASN1OctetString encryptedKey
identifierback to summary
private KeyAgreeRecipientIdentifier identifier

Constructor Detail

RecipientEncryptedKeyback to summary
private RecipientEncryptedKey(ASN1Sequence seq)
RecipientEncryptedKeyback to summary
public RecipientEncryptedKey(KeyAgreeRecipientIdentifier id, ASN1OctetString encryptedKey)

Method Detail

getEncryptedKeyback to summary
public ASN1OctetString getEncryptedKey()
getIdentifierback to summary
public KeyAgreeRecipientIdentifier getIdentifier()
getInstanceback to summary
public static RecipientEncryptedKey getInstance(ASN1TaggedObject obj, boolean explicit)

Return an RecipientEncryptedKey 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 RecipientEncryptedKey getInstance(Object obj)

Return a RecipientEncryptedKey object from the given object.

Accepted inputs:

Parameters
obj:Object

the object we want converted.

Exceptions
IllegalArgumentException:
if the object cannot be converted.
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.