Close the underlying data stream.
Note: The SIGNATURE parameter is only available when generating unsigned attributes.
containing class for an CMS Compressed Data object
General class for generating a compressed CMS message.
Class for reading a CMS Compressed Data stream.
General class for generating a compressed CMS message stream.
a holding class for a byte array of data to be enveloped.
containing class for an CMS Enveloped Data object
General class for generating a CMS enveloped-data message.
constructor allowing specific source of randomness
Parsing class for an CMS Enveloped Data object from an input stream.
General class for generating a CMS enveloped-data message stream.
constructor allowing specific source of randomness
General class for generating a CMS enveloped-data message.
constructor allowing specific source of randomness
a holding class for a BodyPart to be processed.
a holding class for a BodyPart to be processed which does CRLF canonicalisation if
dealing with non-binary data.
Create a processable with the default transfer encoding of 7bit
Create a processable with the a default transfer encoding of
the passed in value.
a holding class for a BodyPart to be processed which does CRLF canocicalisation if
dealing with non-binary data.
Create a processable with the default transfer encoding of 7bit
Create a processable with the a default transfer encoding of
the passed in value.
a holding class for a byte array of data to be processed.
a holding class for a file of data to be processed.
a holding class for a byte array of data to be signed or verified.
general class for handling a pkcs7-signature message.
base constructor - with encapsulated content
Content with detached signature, digests precomputed
base constructor - content with detached signature.
general class for generating a pkcs7-signature message.
constructor allowing specific source of randomness
Parsing class for an CMS Signed Data object from an input stream.
base constructor - with encapsulated content
General class for generating a pkcs7-signature message stream.
constructor allowing specific source of randomness
constructor allowing specific source of randomness
RFC 3274 - CMS Compressed Data.
Produce an object suitable for an ASN1OutputStream.
a simple example that creates a single compressed mail message.
a simple example that creates a single encrypted mail message.
Return a CMS IssuerAndSerialNumber structure for the passed in X.509 certificate.
a simple example that creates a single compressed mail message using the large
file model.
a simple example that creates a single encrypted mail message.
a simple example that creates a single signed mail message.
a simple example that creates a single signed mail message.
a simple example that creates a single signed multipart mail message.
Create a standard attribute table from the passed in parameters - this will
normally include contentType, signingTime, and messageDigest.
generate an compressed object that contains an SMIME Compressed
object using the given provider from the contents of the passed in
message
generate a signed object that contains an SMIME Signed Multipart
object using the given provider.
generate an enveloped object that contains an SMIME Enveloped
object using the given provider.
generate an enveloped object that contains an SMIME Enveloped
object using the given provider.
generate an compressed object that contains an SMIME Compressed
object using the given provider from the contents of the passed in
message
generate a signed object that contains an SMIME Signed Multipart
object using the given provider from the given MimeMessage
generate an enveloped object that contains an SMIME Enveloped
object using the given provider from the contents of the passed in
message.
generate an enveloped object that contains an SMIME Enveloped
object using the given provider from the contents of the passed in
message
generate a signed object that for a CMS Signed Data
object using the given provider - if encapsulate is true a copy
of the message will be included in the signature with the
default content type "data".
generate an object that contains an CMS Compressed Data
generate a signed object that for a CMS Signed Data
object using the given provider.
generate an enveloped object that contains an CMS Enveloped Data
object using the given provider.
generate an enveloped object that contains an CMS Enveloped Data
object using the given provider.
generate a signed object that for a CMS Signed Data
object using the given provider - if encapsulate is true a copy
of the message will be included in the signature.
Similar method to the other generate methods.
Creates a certificate management message which is like a signed message with no content
or signers but that still carries certificates and CRLs.
generate a set of one or more SignerInformation objects representing counter signatures on
the passed in SignerInformation object.
generate a signed message with encapsulated content
Note: doing this is strongly
not recommended as it means a
recipient of the message will have to be able to read the signature to read the
message.
generate a signed object that contains an SMIME Signed Multipart
object using the given provider from the given MimeMessage.
Return the first RecipientInformation object that matches the
passed in selector.
Return the first SignerInformation object that matches the
passed in selector.
return a X509Store containing the attribute certificates, if any, contained
in this message.
return a X509Store containing the attribute certificates, if any, contained
in this message.
return a X509Store containing the public key certificates, if any, contained
in this message.
return a X509Store containing the public key certificates, if any, contained
in this message.
return a CertStore containing the certificates and CRLs associated with
this message.
return a CertStore containing the certificates and CRLs associated with
this message.
return the content that was signed.
return the content that was signed.
Return the content that was signed as a mime message.
Return the content that was signed as a mime message.
return the content digest that was calculated during verification.
decrypt the content and return an input stream.
decrypt the content and return an input stream.
decrypt the content and return it as a byte array.
decrypt the content and return an input stream.
return the content that was signed - depending on whether this was
unencapsulated or not it will return a MimeMultipart or a MimeBodyPart
return the content that was signed with its signature attached.
Return a SignerInformationStore containing the counter signatures attached to this
signer.
return a X509Store containing CRLs, if any, contained
in this message.
return a X509Store containing CRLs, if any, contained
in this message.
return the object identifier for the signature.
return the signature parameters, or null if there aren't any.
return the ASN.1 encoded representation of this object.
return the ASN.1 encoded representation of this object.
return the ASN.1 encoded representation of this object.
return the DER encoding of the signed attributes.
return the object identifier for the content encryption algorithm.
return the object identifier for the content encryption algorithm.
return the object identifier for the signature.
Return an AlgorithmParameters object giving the encryption parameters
used to encrypt the message content.
Return an AlgorithmParameters object giving the encryption parameters
used to encrypt the message content.
return the ASN.1 encoded encryption algorithm parameters, or null if
there aren't any.
return the ASN.1 encoded encryption algorithm parameters, or null if
there aren't any.
return the signature/encyrption algorithm parameters, or null if
there aren't any.
Return a map of oids and byte arrays representing the digests calculated on the content during
the last generate.
Return a map of oids and byte arrays representing the digests calculated on the content during
the last generate.
return the object identifier for the key encryption algorithm.
Return an AlgorithmParameters object giving the encryption parameters
used to encrypt the key this recipient holds.
return the ASN.1 encoded key encryption algorithm parameters, or null if
there aren't any.
return the secret key identifier
Return an input stream representing the content bytes of the object.
return a store of the intended recipients for this message
return a store of the intended recipients for this message
Return all recipients in the collection
Return possible empty collection with recipients matching the passed in RecipientId
Return the shared stream that represents the top most stream that
this stream inherits from.
return the encoded signature
return a table of the signed attributes - indexed by
the OID of the attribute.
Return the a string representation of the OID associated with the
encapsulated content info structure carried in the signed data.
return the collection of signers that are associated with the
signatures for the message.
return the collection of signers that are associated with the
signatures for the message.
Return all signers in the collection
Return possible empty collection with signers matching the passed in SignerId
Return the tag number for this object.
return a table of the unprotected attributes indexed by
the OID of the attribute.
return a table of the unprotected attributes indexed by
the OID of the attribute.
return a table of the unsigned attributes indexed by
the OID of the attribute.
Return the version number for this object
Return the version number for the SignedData object
return the version number for this objects underlying SignerInfo structure.
generate a signed object that for a CMS Signed Data
object using the given provider.
generate a signed object that for a CMS Signed Data
object using the given provider - if encapsulate is true a copy
of the message will be included in the signature with the
default content type "data".
generate a signed object that for a CMS Signed Data
object using the given provider - if encapsulate is true a copy
of the message will be included in the signature with the
default content type "data".
generate a signed object that for a CMS Signed Data
object using the given provider - if encapsulate is true a copy
of the message will be included in the signature.
generate a signed object that for a CMS Signed Data
object using the given provider - if encapsulate is true a copy
of the message will be included in the signature.
generate an enveloped object that contains an CMS Enveloped Data
object using the given provider.
generate an enveloped object that contains an CMS Enveloped Data
object using the given provider.
A package for processing RFC 3852 Cryptographic Message Syntax (CMS) objects - also referred to as PKCS#7 (formerly RFC 2630, 3369).
Regression tests for the org.bouncycastle.cms package.
High level classes for dealing with S/MIME objects (RFC 3851).
Example code demonstrating the use of the S/MIME package for a variety of uses.
S/MIME handlers for the JavaMail API.
Regression tests for the org.bouncycastle.mail.smime package.
A library for parsing and writing ASN.1 objects using a streaming model.
Example that sends a signed and encrypted mail message.
SET - static field in class org.bouncycastle.sasn1.
BerTag SET_OF - static field in class org.bouncycastle.sasn1.
BerTag Use a BER Set to store the recipient information
Use a BER Set to store the recipient information
Set the underlying string size for encapsulated data
Set the underlying string size for encapsulated data
set the content-transfer-encoding for the signature.
set a secret key identifier (for use with KEKRecipientInfo)
SignedData ::= SEQUENCE {
version CMSVersion,
digestAlgorithms DigestAlgorithmIdentifiers,
encapContentInfo EncapsulatedContentInfo,
certificates [0] IMPLICIT CertificateSet OPTIONAL,
crls [1] IMPLICIT CertificateRevocationLists OPTIONAL,
signerInfos SignerInfos
}
a basic index for a signer.
an expanded SignerInfo block from a CMS Signed message
Basic generator that just returns a preconstructed attribute table
Return the number of recipients in the collection.
Return the number of signers in the collection.
containing class for an S/MIME pkcs7-mime MimePart.
General class for generating a pkcs7-mime compressed message.
Stream based containing class for an S/MIME pkcs7-mime compressed MimePart.
Create a parser from a MimeBodyPart using the passed in buffer size
for reading it.
Create a parser from a MimeMessage using the passed in buffer size
for reading it.
containing class for an S/MIME pkcs7-mime encrypted MimePart.
General class for generating a pkcs7-mime message.
Stream based containing class for an S/MIME pkcs7-mime encrypted MimePart.
Create a parser from a MimeBodyPart using the passed in buffer size
for reading it.
Create a parser from a MimeMessage using the passed in buffer size
for reading it.
super class of the various generators.
general class for handling a pkcs7-signature message.
base constructor using a defaultContentTransferEncoding of 7bit
base constructor with settable contentTransferEncoding
base constructor for a signed message with encapsulated content.
general class for generating a pkcs7-signature message.
base constructor - default content transfer encoding 7bit
base constructor - default content transfer encoding explicitly set
general class for handling a pkcs7-signature message.
base constructor using a defaultContentTransferEncoding of 7bit.
base constructor using a defaultContentTransferEncoding of 7bit and a specified backing file.
base constructor with settable contentTransferEncoding.
base constructor with settable contentTransferEncoding and a specified backing file.
base constructor for a signed message with encapsulated content.
Constructor for a signed message with encapsulated content.