CertificateEncryptionOptions

CertificateEncryptionOptions

Overview

CertificateEncryptionOptions is a class in Aspose.PDF FOSS for .NET.

Bundles the public certificate used to encrypt a document and the private-key store needed to decrypt it.

This class declares 4 methods for CertificateEncryptionOptions objects in .NET programs. Available methods include: CertificateEncryptionOptions. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: PfxPassword, PfxPath, PublicCertificate, StoreLocation, StoreName.

Properties

NameTypeAccessDescription
PublicCertificateX509Certificate2ReadPublic-key certificate that encrypted the document (the Recipient entry of a PDF Public-Key security handler dictionary).
PfxPathstring?ReadPath to a PFX/PKCS#12 file holding the private key matching PublicCertificate, or null when the private key is in a Windows certificate store.
PfxPasswordstring?ReadPassword for the PFX file at PfxPath, or null when the file isn’t password-protected.
StoreNameStoreName?ReadWindows certificate store containing the private key, when no PfxPath is supplied.
StoreLocationStoreLocation?ReadWindows certificate store location.

Methods

SignatureDescription
CertificateEncryptionOptions(publicCertificate: X509Certificate2, pfxPath: string, pfxPassword: string)Creates options from a recipient certificate and a PFX file (with its password) that holds the matching private key.
CertificateEncryptionOptions(publicCertificate: X509Certificate2, storeName: StoreName, storeLocation: StoreLocation)Creates options from a recipient certificate whose private key is looked up in the given Windows certificate store.
CertificateEncryptionOptions(publicCertificatePath: string, pfxPath: string, pfxPassword: string)Creates options by loading the recipient certificate from a file, with the private key taken from a PFX file and its password.
CertificateEncryptionOptions(publicCertificatePath: string, storeName: StoreName, storeLocation: StoreLocation)Creates options by loading the recipient certificate from a file, with the private key looked up in the given Windows certificate store.

See Also

 English