Class CMSSignedContentDocument

java.lang.Object
eu.europa.esig.dss.cms.stream.CMSSignedContentDocument
All Implemented Interfaces:
Serializable

public class CMSSignedContentDocument extends Object
This class is used to extract a wrapped signed content from a CMS document. The class allows providing digest in order to avoid reading the document.
See Also:
  • Field Details

    • digestMap

      protected EnumMap<eu.europa.esig.dss.enumerations.DigestAlgorithm, byte[]> digestMap
    • mimeType

      protected eu.europa.esig.dss.enumerations.MimeType mimeType
    • name

      protected String name
  • Constructor Details

    • CMSSignedContentDocument

      public CMSSignedContentDocument(eu.europa.esig.dss.model.DSSDocument cmsDocument)
      Constructor with a null signed content type
      Parameters:
      cmsDocument - DSSDocument representing the CMS document
    • CMSSignedContentDocument

      public CMSSignedContentDocument(eu.europa.esig.dss.model.DSSDocument cmsDocument, org.bouncycastle.asn1.ASN1ObjectIdentifier signedContentType)
      Constructor with a provided signed content type
      Parameters:
      cmsDocument - DSSDocument representing the CMS document
      signedContentType - ASN1ObjectIdentifier
  • Method Details

    • openStream

      public InputStream openStream()
    • toCMSTypedData

      public org.bouncycastle.cms.CMSTypedData toCMSTypedData()
      Returns a CMSTypedData for a signature creation
      Returns:
      CMSTypedData
    • addDigest

      public void addDigest(eu.europa.esig.dss.model.Digest digest)
      This method allows to add a Digest with a new digest algorithm to the current DigestDocument. Overwrites the previous digest if the same DigestAlgorithm is provided.
      Parameters:
      digest - Digest for the current document
    • save

      public void save(String filePath) throws IOException
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
    • hashCode

      public int hashCode()
    • writeTo

      public void writeTo(OutputStream arg0) throws IOException
      Throws:
      IOException
    • getMimeType

      public eu.europa.esig.dss.enumerations.MimeType getMimeType()
    • setMimeType

      public void setMimeType(eu.europa.esig.dss.enumerations.MimeType arg0)
    • getName

      public String getName()
    • setName

      public void setName(String arg0)
    • getDigest

      public eu.europa.esig.dss.model.Digest getDigest(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0)
    • getDigestValue

      public byte[] getDigestValue(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0)
    • toString

      public String toString()
      Overrides:
      toString in class Object