PKCS7
Overview
PKCS7 is a class in Aspose.PDF FOSS for .NET.
Inherits from: Signature.
This class provides 6 methods for working with PKCS7 objects in .NET programs.
Available methods include: GetSignatureAlgorithmInfo, PKCS7, Signature, Verify.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: Authority, AvoidEstimatingSignatureLength, ByteRange, ContactInfo, CustomAppearance, CustomSignHash, and 8 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Authority | string | Read/Write | Gets or sets the authority. |
ContactInfo | string | Read/Write | Gets or sets the contact info. |
Location | string | Read/Write | Gets or sets the location. |
Reason | string | Read/Write | Gets or sets the reason. |
Date | DateTime | Read/Write | Gets or sets the date. |
ByteRange | int[] | Read | The signature’s /ByteRange entry as int[]. |
TimestampSettings | Aspose.Pdf.TimestampSettings | Read/Write | RFC 3161 TSA settings; honoured by the signer when set. |
OcspSettings | Aspose.Pdf.OcspSettings | Read/Write | OCSP / revocation-check settings; honoured by the signer when set. |
CustomAppearance | SignatureCustomAppearance? | Read/Write | Visual-appearance knobs honoured by SignWithAppearance when the signature is signed via a visible-rect overload. |
CustomSignHash | SignHash? | Read/Write | Optional external-signer callback. |
UseLtv | bool | Read/Write | Gets or sets the use ltv. |
AvoidEstimatingSignatureLength | bool | Read/Write | When true, the signer skips the byte-range estimation pass and uses DefaultSignatureLength directly when reserving space for the PKCS#7 /Contents hex string. |
DefaultSignatureLength | int | Read/Write | Number of bytes reserved for the PKCS#7 /Contents hex string. |
ShowProperties | bool | Read/Write | When true, the visible signature appearance includes the signer’s Reason/Location/ContactInfo as text. |
Methods
| Signature | Description |
|---|---|
PKCS7() | Calls PKCS7 on this PKCS7 instance. |
PKCS7(pfx: string, password: string) | |
PKCS7(pfx: Stream, password: string) | |
Signature() | Calls Signature on this PKCS7 instance. |
Verify() | Verify the loaded signature’s PKCS#7 against the original PDF bytes — returns true when the signature decodes and validates. |
GetSignatureAlgorithmInfo() | Parse the PKCS#7 envelope (when loaded from an existing signature) to report the signing-algorithm / digest-algorithm / cryptographic-standard triple. |