Bouncy Castle Cryptography Library 1.87

org.bouncycastle.cms
Class CMSAuthEnvelopedData

java.lang.Object
  extended byorg.bouncycastle.cms.CMSAuthEnvelopedData
All Implemented Interfaces:
org.bouncycastle.util.Encodable

public class CMSAuthEnvelopedData
extends java.lang.Object
implements org.bouncycastle.util.Encodable

containing class for an CMS AuthEnveloped Data object


Constructor Summary
CMSAuthEnvelopedData(byte[] authEnvData)
          Create a CMSAuthEnvelopedData object from its encoding.
CMSAuthEnvelopedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
          Create a CMSAuthEnvelopedData object from an already-parsed ContentInfo.
CMSAuthEnvelopedData(java.io.InputStream authEnvData)
          Create a CMSAuthEnvelopedData object from a stream.
 
Method Summary
 org.bouncycastle.asn1.cms.AttributeTable getAuthAttrs()
          return a table of the authenticated attributes (as in those used to provide associated data) indexed by the OID of the attribute.
 byte[] getEncoded()
          return the ASN.1 encoded representation of this object.
 java.lang.String getEncryptionAlgOID()
          return the object identifier for the content encryption algorithm.
 byte[] getMac()
          Return the MAC value that was originally calculated for this AuthEnveloped data.
 OriginatorInformation getOriginatorInfo()
          Return the originator information associated with this message if present.
 RecipientInformationStore getRecipientInfos()
          return a store of the intended recipients for this message
 org.bouncycastle.asn1.cms.AttributeTable getUnauthAttrs()
          return a table of the unauthenticated attributes indexed by the OID of the attribute.
 org.bouncycastle.asn1.cms.ContentInfo toASN1Structure()
          return the ContentInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMSAuthEnvelopedData

public CMSAuthEnvelopedData(byte[] authEnvData)
                     throws CMSException
Create a CMSAuthEnvelopedData object from its encoding.

Parameters:
authEnvData - the complete encoding of the AuthEnvelopedData structure (a CMS ContentInfo). The array must hold the entire encoding and nothing extra - trailing bytes beyond the AuthEnvelopedData are not permitted.
Throws:
CMSException - if the encoding cannot be parsed as an AuthEnvelopedData.

CMSAuthEnvelopedData

public CMSAuthEnvelopedData(java.io.InputStream authEnvData)
                     throws CMSException
Create a CMSAuthEnvelopedData object from a stream.

Parameters:
authEnvData - a stream positioned at the start of the AuthEnvelopedData encoding (a CMS ContentInfo).
Throws:
CMSException - if the encoding cannot be parsed as an AuthEnvelopedData.

CMSAuthEnvelopedData

public CMSAuthEnvelopedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
                     throws CMSException
Create a CMSAuthEnvelopedData object from an already-parsed ContentInfo.

Parameters:
contentInfo - the ContentInfo carrying the AuthEnvelopedData.
Throws:
CMSException - if the ContentInfo does not hold a well-formed AuthEnvelopedData.
Method Detail

getEncryptionAlgOID

public java.lang.String getEncryptionAlgOID()
return the object identifier for the content encryption algorithm.


getOriginatorInfo

public OriginatorInformation getOriginatorInfo()
Return the originator information associated with this message if present.

Returns:
OriginatorInformation, null if not present.

getRecipientInfos

public RecipientInformationStore getRecipientInfos()
return a store of the intended recipients for this message


getAuthAttrs

public org.bouncycastle.asn1.cms.AttributeTable getAuthAttrs()
return a table of the authenticated attributes (as in those used to provide associated data) indexed by the OID of the attribute.

Returns:
the authenticated attributes.

getUnauthAttrs

public org.bouncycastle.asn1.cms.AttributeTable getUnauthAttrs()
return a table of the unauthenticated attributes indexed by the OID of the attribute.

Returns:
the unauthenticated attributes.

getMac

public byte[] getMac()
Return the MAC value that was originally calculated for this AuthEnveloped data.

Returns:
the MAC data associated with the stream.

toASN1Structure

public org.bouncycastle.asn1.cms.ContentInfo toASN1Structure()
return the ContentInfo


getEncoded

public byte[] getEncoded()
                  throws java.io.IOException
return the ASN.1 encoded representation of this object.

Specified by:
getEncoded in interface org.bouncycastle.util.Encodable
Throws:
java.io.IOException

Bouncy Castle Cryptography Library 1.87