PKCS7SignedData

PKCS7SignedData

Overview

PKCS7SignedData is a class in Aspose.PDF FOSS for Java.

Parses and creates PKCS#7 SignedData structures (RFC 2315 §9).

This class provides 8 methods for working with PKCS7SignedData objects in Java programs. Available methods include: createDetached, encode, getCertificates, getEncapsulatedContent, getSignerInfos, getVersion, parse, verify. All public members are accessible to any Java application after installing the Aspose.PDF FOSS for Java package. Properties: certificates, encapsulatedContent, signerInfos, version.

Properties

NameTypeAccessDescription
encapsulatedContentbyte[]ReadReturns the encapsulated content data, if any.
signerInfosList<SignerInfo>ReadGets the signer infos.
certificatesList<X509Certificate>ReadGets the certificates.
versionintReadGets the version.

Methods

SignatureDescription
parse(pkcs7Bytes: byte[])PKCS7SignedDataParses PKCS#7 SignedData from DER-encoded bytes.
createDetached(privateKey: PrivateKey, certificate: X509Certificate, chain: X509Certificate[], digestAlgorithm: String, dataToSign: byte[])PKCS7SignedDataCreates a detached PKCS#7 signature.
verify(originalData: byte[])booleanVerifies the signature against original data.
getEncapsulatedContent()byte[]Returns the encapsulated content data, if any.
encode()byte[]Encodes this SignedData to DER bytes.
getSignerInfos()List<SignerInfo>Returns the signer infos.
getCertificates()List<X509Certificate>Returns the certificates.
getVersion()intReturns the version.

See Also

 English