public class CMSEncryptedData
extends java.lang.Object
| Constructor and Description |
|---|
CMSEncryptedData(byte[] encryptedData)
Create a CMSEncryptedData object from its encoding.
|
CMSEncryptedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
Create a CMSEncryptedData object from an already-parsed ContentInfo.
|
CMSEncryptedData(java.io.InputStream encryptedData)
Create a CMSEncryptedData object from a stream.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getContent(InputDecryptorProvider inputDecryptorProvider) |
CMSTypedStream |
getContentStream(InputDecryptorProvider inputDecryptorProvider) |
org.bouncycastle.asn1.cms.ContentInfo |
toASN1Structure()
return the ContentInfo
|
public CMSEncryptedData(byte[] encryptedData)
throws CMSException
encryptedData - the complete encoding of the EncryptedData structure (a CMS ContentInfo).
The array must hold the entire encoding and nothing extra - trailing bytes
beyond the EncryptedData are not permitted.CMSException - if the encoding cannot be parsed as an EncryptedData.public CMSEncryptedData(java.io.InputStream encryptedData)
throws CMSException
encryptedData - a stream positioned at the start of the EncryptedData encoding (a CMS ContentInfo).CMSException - if the encoding cannot be parsed as an EncryptedData.public CMSEncryptedData(org.bouncycastle.asn1.cms.ContentInfo contentInfo)
Note: unlike the sibling CMS container constructors this one is not declared to throw CMSException; malformed inner content surfaces as an IllegalArgumentException.
contentInfo - the ContentInfo carrying the EncryptedData.public byte[] getContent(InputDecryptorProvider inputDecryptorProvider) throws CMSException
CMSExceptionpublic CMSTypedStream getContentStream(InputDecryptorProvider inputDecryptorProvider) throws CMSException
CMSExceptionpublic org.bouncycastle.asn1.cms.ContentInfo toASN1Structure()