PdfPublicKeyDecryptionHandler Constructor (X509Certificate2)

Creates a new decryption handler with the specified certificate.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public PdfPublicKeyDecryptionHandler(
	X509Certificate2 certificate
)
VB
Public Sub New ( 
	certificate As X509Certificate2
)

Parameters

certificate
Type: System.Security.Cryptography.X509Certificates.X509Certificate2
The certificate to use to decrypt a document.

Remarks

The certificate must be marked exportable. If it is not, then an instance of PdfException will be thrown.

To decrypt a document, the certificate should match a recipient specified in the document recipients collection. If the certificate does not match a recipient, an instance of CannotDecryptPdfException will be thrown later when the handler is used to decrypt a document.

The permissions for the decrypted document might vary, depending on the certificate.

See Also