Bouncy Castle Cryptography Library 1.84

org.bouncycastle.cms
Class CMSSignedDataStreamEditor

java.lang.Object
  extended byorg.bouncycastle.cms.CMSSignedDataStreamEditor

public class CMSSignedDataStreamEditor
extends java.lang.Object


Constructor Summary
CMSSignedDataStreamEditor()
           
 
Method Summary
static java.io.OutputStream addDigestAlgorithm(java.io.OutputStream out, java.io.InputStream original, org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm, DigestAlgorithmIdentifierFinder digestAlgIdFinder, DigestCalculatorProvider digestCalculatorProvider)
          Add the specified digest algorithm to the signed data contained in the input stream and write the updated signed data to the provided output stream.
static java.io.OutputStream addDigestAlgorithm(java.io.OutputStream out, java.io.InputStream original, org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm, DigestCalculatorProvider digestCalculatorProvider)
          Add the specified digest algorithm to the signed data contained in the input stream and write the updated signed data to the provided output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMSSignedDataStreamEditor

public CMSSignedDataStreamEditor()
Method Detail

addDigestAlgorithm

public static java.io.OutputStream addDigestAlgorithm(java.io.OutputStream out,
                                                      java.io.InputStream original,
                                                      org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm,
                                                      DigestAlgorithmIdentifierFinder digestAlgIdFinder,
                                                      DigestCalculatorProvider digestCalculatorProvider)
                                               throws java.io.IOException,
                                                      CMSException
Add the specified digest algorithm to the signed data contained in the input stream and write the updated signed data to the provided output stream. This ensures that the output signed data includes the specified digest algorithm. Uses the provided DigestAlgorithmIdentifierFinder to create the digest sets and the DigestCalculatorProvider for computing the required digests.

The output stream is returned unclosed.

Parameters:
out - the output stream where the updated signed data object will be written.
original - the input stream containing the original signed data to be modified.
digestAlgorithm - the digest algorithm to be added to the signed data.
digestAlgIdFinder - the DigestAlgorithmIdentifierFinder used to create the digest sets.
digestCalculatorProvider - the DigestCalculatorProvider used to compute the digests.
Returns:
the output stream containing the updated signed data.
Throws:
java.io.IOException
CMSException

addDigestAlgorithm

public static java.io.OutputStream addDigestAlgorithm(java.io.OutputStream out,
                                                      java.io.InputStream original,
                                                      org.bouncycastle.asn1.x509.AlgorithmIdentifier digestAlgorithm,
                                                      DigestCalculatorProvider digestCalculatorProvider)
                                               throws java.io.IOException,
                                                      CMSException
Add the specified digest algorithm to the signed data contained in the input stream and write the updated signed data to the provided output stream. This ensures that the output signed data includes the specified digest algorithm.

The output stream is returned unclosed.

Parameters:
out - the output stream where the updated signed data object will be written.
original - the input stream containing the original signed data to be modified.
digestAlgorithm - the digest algorithm to be added to the signed data.
Returns:
the output stream containing the updated signed data.
Throws:
java.io.IOException
CMSException

Bouncy Castle Cryptography Library 1.84