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

public Class AuthenticatedData

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

RFC 5652 section 9.1: The AuthenticatedData carries AuthAttributes and other data which define what really is being signed.
AuthenticatedData ::= SEQUENCE {
      version CMSVersion,
      originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
      recipientInfos RecipientInfos,
      macAlgorithm MessageAuthenticationCodeAlgorithm,
      digestAlgorithm [1] DigestAlgorithmIdentifier OPTIONAL,
      encapContentInfo EncapsulatedContentInfo,
      authAttrs [2] IMPLICIT AuthAttributes OPTIONAL,
      mac MessageAuthenticationCode,
      unauthAttrs [3] IMPLICIT UnauthAttributes OPTIONAL }

AuthAttributes ::= SET SIZE (1..MAX) OF Attribute

UnauthAttributes ::= SET SIZE (1..MAX) OF Attribute

MessageAuthenticationCode ::= OCTET STRING

Field Summary

Modifier and TypeField and Description
private ASN1Set
private AlgorithmIdentifier
private ContentInfo
private ASN1OctetString
private AlgorithmIdentifier
private OriginatorInfo
private ASN1Set
private ASN1Set
private ASN1Integer

Constructor Summary

AccessConstructor and Description
public
AuthenticatedData(OriginatorInfo originatorInfo, ASN1Set recipientInfos, AlgorithmIdentifier macAlgorithm, AlgorithmIdentifier digestAlgorithm, ContentInfo encapsulatedContent, ASN1Set authAttrs, ASN1OctetString mac, ASN1Set unauthAttrs)

private

Method Summary

Modifier and TypeMethod and Description
public static int
public ASN1Set
public AlgorithmIdentifier
public ContentInfo
public static AuthenticatedData

Returns:

a reference that can be assigned to AuthenticatedData (may be null)
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 AuthenticatedData object from a tagged object.

public static AuthenticatedData

Returns:

a reference that can be assigned to AuthenticatedData (may be null)
getInstance
(Object
the object we want converted.
obj
)

Return an AuthenticatedData object from the given object.

public ASN1OctetString
public AlgorithmIdentifier
public OriginatorInfo
public ASN1Set
public ASN1Set
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:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

authAttrsback to summary
private ASN1Set authAttrs
digestAlgorithmback to summary
private AlgorithmIdentifier digestAlgorithm
encapsulatedContentInfoback to summary
private ContentInfo encapsulatedContentInfo
macback to summary
private ASN1OctetString mac
macAlgorithmback to summary
private AlgorithmIdentifier macAlgorithm
originatorInfoback to summary
private OriginatorInfo originatorInfo
recipientInfosback to summary
private ASN1Set recipientInfos
unauthAttrsback to summary
private ASN1Set unauthAttrs
versionback to summary
private ASN1Integer version

Constructor Detail

AuthenticatedDataback to summary
public AuthenticatedData(OriginatorInfo originatorInfo, ASN1Set recipientInfos, AlgorithmIdentifier macAlgorithm, AlgorithmIdentifier digestAlgorithm, ContentInfo encapsulatedContent, ASN1Set authAttrs, ASN1OctetString mac, ASN1Set unauthAttrs)
AuthenticatedDataback to summary
private AuthenticatedData(ASN1Sequence seq)

Method Detail

calculateVersionback to summary
public static int calculateVersion(OriginatorInfo origInfo)
getAuthAttrsback to summary
public ASN1Set getAuthAttrs()
getDigestAlgorithmback to summary
public AlgorithmIdentifier getDigestAlgorithm()
getEncapsulatedContentInfoback to summary
public ContentInfo getEncapsulatedContentInfo()
getInstanceback to summary
public static AuthenticatedData getInstance(ASN1TaggedObject obj, boolean explicit)

Return an AuthenticatedData 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.

Returns:AuthenticatedData

a reference that can be assigned to AuthenticatedData (may be null)

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

Return an AuthenticatedData object from the given object.

Accepted inputs:

Parameters
obj:Object

the object we want converted.

Returns:AuthenticatedData

a reference that can be assigned to AuthenticatedData (may be null)

Exceptions
IllegalArgumentException:
if the object cannot be converted.
getMacback to summary
public ASN1OctetString getMac()
getMacAlgorithmback to summary
public AlgorithmIdentifier getMacAlgorithm()
getOriginatorInfoback to summary
public OriginatorInfo getOriginatorInfo()
getRecipientInfosback to summary
public ASN1Set getRecipientInfos()
getUnauthAttrsback to summary
public ASN1Set getUnauthAttrs()
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.