Class CMSDigestedData
java.lang.Object
org.bouncycastle.cms.CMSDigestedData
- All Implemented Interfaces:
org.bouncycastle.util.Encodable
containing class for an CMS Digested Data object
CMSDigestedData cd = new CMSDigestedData(inputStream);
process(cd.getContent());
-
Constructor Summary
ConstructorsConstructorDescriptionCMSDigestedData(byte[] compressedData) Create a CMSDigestedData object from its encoding.CMSDigestedData(InputStream compressedData) Create a CMSDigestedData object from a stream.CMSDigestedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo) Create a CMSDigestedData object from an already-parsed ContentInfo. -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.asn1.ASN1ObjectIdentifierorg.bouncycastle.asn1.x509.AlgorithmIdentifierReturn the digested contentbyte[]return the ASN.1 encoded representation of this object.org.bouncycastle.asn1.cms.ContentInforeturn the ContentInfobooleanverify(DigestCalculatorProvider calculatorProvider)
-
Constructor Details
-
CMSDigestedData
Create a CMSDigestedData object from its encoding.- Parameters:
compressedData- the complete encoding of the DigestedData structure (a CMS ContentInfo). The array must hold the entire encoding and nothing extra - trailing bytes beyond the DigestedData are not permitted.- Throws:
CMSException- if the encoding cannot be parsed as a DigestedData.
-
CMSDigestedData
Create a CMSDigestedData object from a stream.- Parameters:
compressedData- a stream positioned at the start of the DigestedData encoding (a CMS ContentInfo).- Throws:
CMSException- if the encoding cannot be parsed as a DigestedData.
-
CMSDigestedData
Create a CMSDigestedData object from an already-parsed ContentInfo.- Parameters:
contentInfo- the ContentInfo carrying the DigestedData.- Throws:
CMSException- if the ContentInfo does not hold a well-formed DigestedData.
-
-
Method Details
-
getContentType
public org.bouncycastle.asn1.ASN1ObjectIdentifier getContentType() -
getDigestAlgorithm
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithm() -
getDigestedContent
Return the digested content- Returns:
- the digested content
- Throws:
CMSException- if there is an exception un-compressing the data.
-
toASN1Structure
public org.bouncycastle.asn1.cms.ContentInfo toASN1Structure()return the ContentInfo -
getEncoded
return the ASN.1 encoded representation of this object.- Specified by:
getEncodedin interfaceorg.bouncycastle.util.Encodable- Throws:
IOException
-
verify
- Throws:
CMSException
-