Constructor PdfPublicKeyEncryptionHandler
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
PdfPublicKeyEncryptionHandler(X509Certificate2)
Creates a new instance of Public-Key Security encryption handler using the specified owner certificate.
public PdfPublicKeyEncryptionHandler(X509Certificate2 ownerCertificate)
Parameters
ownerCertificateX509Certificate2The owner certificate to use while encrypting data.
Remarks
An owner certificate allows full (owner) access to the document. This unlimited access includes the ability to change the document's encryption and access permissions.
The Encrypt PDF documents in C# and VB.NET article describes how to encrypt PDF documents.
PdfPublicKeyEncryptionHandler(string, string)
Creates a new instance of Public-Key Security encryption handler with owner permissions using the specified key store file.
public PdfPublicKeyEncryptionHandler(string ownerKeyStorePath, string password)
Parameters
ownerKeyStorePathstringThe path to the PFX / PKCS #12 key store file.
passwordstringThe password to read the key store file.
Remarks
The certificate in the keystore is assumed to be an owner certificate.
An owner certificate allows full (owner) access to the document. This unlimited access includes the ability to change the document's encryption and access permissions.
Read the Encrypt PDF documents in C# and VB.NET article for examples of using this constructor.
PdfPublicKeyEncryptionHandler(Stream, string)
Creates a new instance of Public-Key Security encryption handler with owner permissions using the specified stream with key store contents.
public PdfPublicKeyEncryptionHandler(Stream ownerKeyStoreStream, string password)
Parameters
ownerKeyStoreStreamStreamThe stream with the PFX / PKCS #12 key store contents.
passwordstringThe password to read the key store stream.
Remarks
The certificate in the keystore is assumed to be an owner certificate.
An owner certificate allows full (owner) access to the document. This unlimited access includes the ability to change the document's encryption and access permissions.
The Encrypt PDF documents in C# and VB.NET article describes how to encrypt PDF documents.
PdfPublicKeyEncryptionHandler(X509Certificate2, PdfPermissions)
Creates a new instance of Public-Key Security encryption handler using the specified certificate and permissions.
public PdfPublicKeyEncryptionHandler(X509Certificate2 certificate, PdfPermissions permissions)
Parameters
certificateX509Certificate2The certificate to use while encrypting data.
permissionsPdfPermissionsThe permissions to grant for the document recipient.
Remarks
The Encrypt PDF documents in C# and VB.NET article describes how to encrypt PDF documents.
PdfPublicKeyEncryptionHandler(string, string, PdfPermissions)
Creates a new instance of Public-Key Security encryption handler with the specified permissions using the specified key store file.
public PdfPublicKeyEncryptionHandler(string keyStorePath, string password, PdfPermissions permissions)
Parameters
keyStorePathstringThe path to the PFX / PKCS #12 key store file.
passwordstringThe password to read the key store file.
permissionsPdfPermissionsThe permissions to grant for the document recipient.
Remarks
The Encrypt PDF documents in C# and VB.NET article describes how to encrypt PDF documents.
PdfPublicKeyEncryptionHandler(Stream, string, PdfPermissions)
Creates a new instance of Public-Key Security encryption handler with the specified permissions using the specified stream with key store contents.
public PdfPublicKeyEncryptionHandler(Stream keyStoreStream, string password, PdfPermissions permissions)
Parameters
keyStoreStreamStreamThe stream with the PFX / PKCS #12 key store contents.
passwordstringThe password to read the key store stream.
permissionsPdfPermissionsThe permissions to grant for the document recipient.
Remarks
The Encrypt PDF documents in C# and VB.NET article describes how to encrypt PDF documents.