|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bouncycastle.cms.CMSAuthenticatedData
Containing class for a CMS AuthenticatedData object.
The MAC is checked by comparing getMac() with RecipientInformation.getMac() for the
recipient whose content was recovered; the latter also checks the authenticated attributes, when
present, against the content.
| Constructor Summary | |
CMSAuthenticatedData(byte[] authData)
Create a CMSAuthenticatedData object from its encoding. |
|
CMSAuthenticatedData(byte[] authData,
DigestCalculatorProvider digestCalculatorProvider)
Create a CMSAuthenticatedData object from its encoding. |
|
CMSAuthenticatedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
Create a CMSAuthenticatedData object from an already-parsed ContentInfo. |
|
CMSAuthenticatedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo,
DigestCalculatorProvider digestCalculatorProvider)
Create a CMSAuthenticatedData object from an already-parsed ContentInfo. |
|
CMSAuthenticatedData(java.io.InputStream authData)
Create a CMSAuthenticatedData object from a stream. |
|
CMSAuthenticatedData(java.io.InputStream authData,
DigestCalculatorProvider digestCalculatorProvider)
Create a CMSAuthenticatedData object from a stream. |
|
| Method Summary | |
org.bouncycastle.asn1.cms.AttributeTable |
getAuthAttributes()
return a table of the authenticated attributes - indexed by the OID of the attribute. |
org.bouncycastle.asn1.cms.AttributeTable |
getAuthAttrs()
Deprecated. Use getAuthAttributes() instead. |
byte[] |
getContentDigest()
|
org.bouncycastle.asn1.cms.ContentInfo |
getContentInfo()
Deprecated. use toASN1Structure() |
byte[] |
getEncoded()
return the ASN.1 encoded representation of this object. |
byte[] |
getMac()
|
java.lang.String |
getMacAlgOID()
return the object identifier for the content MAC algorithm. |
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getMacAlgorithm()
Return the MAC algorithm details for the MAC associated with the data in this object. |
byte[] |
getMacAlgParams()
return the ASN.1 encoded MAC algorithm parameters, or null if there aren't any. |
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 |
getUnauthAttributes()
return a table of the unauthenticated attributes - indexed by the OID of the attribute. |
org.bouncycastle.asn1.cms.AttributeTable |
getUnauthAttrs()
Deprecated. Use getUnauthAttributes() instead. |
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 |
public CMSAuthenticatedData(byte[] authData)
throws CMSException
authData - the complete encoding of the AuthenticatedData structure (a CMS ContentInfo).
The array must hold the entire encoding and nothing extra - trailing bytes
beyond the AuthenticatedData are not permitted.
CMSException - if the encoding cannot be parsed as an AuthenticatedData.
public CMSAuthenticatedData(byte[] authData,
DigestCalculatorProvider digestCalculatorProvider)
throws CMSException
authData - the complete encoding of the AuthenticatedData structure (a CMS ContentInfo).
The array must hold the entire encoding and nothing extra - trailing bytes
beyond the AuthenticatedData are not permitted.digestCalculatorProvider - provider for the digest calculators needed to verify the MAC.
CMSException - if the encoding cannot be parsed as an AuthenticatedData.
public CMSAuthenticatedData(java.io.InputStream authData)
throws CMSException
authData - a stream positioned at the start of the AuthenticatedData encoding (a CMS ContentInfo).
CMSException - if the encoding cannot be parsed as an AuthenticatedData.
public CMSAuthenticatedData(java.io.InputStream authData,
DigestCalculatorProvider digestCalculatorProvider)
throws CMSException
authData - a stream positioned at the start of the AuthenticatedData encoding (a CMS ContentInfo).digestCalculatorProvider - provider for the digest calculators needed to verify the MAC.
CMSException - if the encoding cannot be parsed as an AuthenticatedData.
public CMSAuthenticatedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
throws CMSException
contentInfo - the ContentInfo carrying the AuthenticatedData.
CMSException - if the ContentInfo does not hold a well-formed AuthenticatedData.
public CMSAuthenticatedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo,
DigestCalculatorProvider digestCalculatorProvider)
throws CMSException
contentInfo - the ContentInfo carrying the AuthenticatedData.digestCalculatorProvider - provider for the digest calculators needed to verify the MAC.
CMSException - if the ContentInfo does not hold a well-formed AuthenticatedData.| Method Detail |
public OriginatorInformation getOriginatorInfo()
public byte[] getMac()
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getMacAlgorithm()
public java.lang.String getMacAlgOID()
public byte[] getMacAlgParams()
public RecipientInformationStore getRecipientInfos()
public org.bouncycastle.asn1.cms.ContentInfo getContentInfo()
public org.bouncycastle.asn1.cms.ContentInfo toASN1Structure()
public org.bouncycastle.asn1.cms.AttributeTable getAuthAttrs()
getAuthAttributes() instead.
public org.bouncycastle.asn1.cms.AttributeTable getAuthAttributes()
public org.bouncycastle.asn1.cms.AttributeTable getUnauthAttrs()
getUnauthAttributes() instead.
public org.bouncycastle.asn1.cms.AttributeTable getUnauthAttributes()
public byte[] getEncoded()
throws java.io.IOException
getEncoded in interface org.bouncycastle.util.Encodablejava.io.IOExceptionpublic byte[] getContentDigest()
|
Bouncy Castle Cryptography Library 1.87 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||