public class CMSDigestedData
extends java.lang.Object
implements org.bouncycastle.util.Encodable
CMSDigestedData cd = new CMSDigestedData(inputStream);
process(cd.getContent());
| Constructor and Description |
|---|
CMSDigestedData(byte[] compressedData)
Create a CMSDigestedData object from its encoding.
|
CMSDigestedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
Create a CMSDigestedData object from an already-parsed ContentInfo.
|
CMSDigestedData(java.io.InputStream compressedData)
Create a CMSDigestedData object from a stream.
|
| Modifier and Type | Method and Description |
|---|---|
org.bouncycastle.asn1.ASN1ObjectIdentifier |
getContentType() |
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getDigestAlgorithm() |
CMSProcessable |
getDigestedContent()
Return the digested content
|
byte[] |
getEncoded()
return the ASN.1 encoded representation of this object.
|
org.bouncycastle.asn1.cms.ContentInfo |
toASN1Structure()
return the ContentInfo
|
boolean |
verify(DigestCalculatorProvider calculatorProvider) |
public CMSDigestedData(byte[] compressedData)
throws CMSException
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.CMSException - if the encoding cannot be parsed as a DigestedData.public CMSDigestedData(java.io.InputStream compressedData)
throws CMSException
compressedData - a stream positioned at the start of the DigestedData encoding (a CMS ContentInfo).CMSException - if the encoding cannot be parsed as a DigestedData.public CMSDigestedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
throws CMSException
contentInfo - the ContentInfo carrying the DigestedData.CMSException - if the ContentInfo does not hold a well-formed DigestedData.public org.bouncycastle.asn1.ASN1ObjectIdentifier getContentType()
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getDigestAlgorithm()
public CMSProcessable getDigestedContent() throws CMSException
CMSException - if there is an exception un-compressing the data.public org.bouncycastle.asn1.cms.ContentInfo toASN1Structure()
public byte[] getEncoded()
throws java.io.IOException
getEncoded in interface org.bouncycastle.util.Encodablejava.io.IOExceptionpublic boolean verify(DigestCalculatorProvider calculatorProvider) throws CMSException
CMSException