PdfPublicKeyEncryptionOptions
OfficeIMO.Pdf
Encrypts a PDF for certificate recipients with the public-key security handler (/Filter /Adobe.PubSec, /SubFilter /adbe.pkcs7.s5, AES-256). Each recipient opens the file with its private key; no password exists.
Inheritance
- object
- PdfPublicKeyEncryptionOptions
Remarks
The security provider creates the CMS EnvelopedData that carries the file key seed and permissions to every recipient. Certificates and the provider are not exposed as public properties, so option snapshots never copy certificate material.
Usage
Explore 1 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Accepted by parameters 1
Constructors
public PdfPublicKeyEncryptionOptions(IOfficeSecurityProvider securityProvider, IEnumerable<X509Certificate2> recipientCertificates) #Creates public-key encryption options for one or more recipient certificates.
Parameters
- securityProvider OfficeIMO.Security.IOfficeSecurityProvider
- Provider that creates CMS EnvelopedData, for example OfficeSecurityProvider from OfficeIMO.Security.
- recipientCertificates System.Collections.Generic.IEnumerable<System.Security.Cryptography.X509Certificates.X509Certificate2>
- Recipient certificates. Only their public keys are used.
public PdfPublicKeyEncryptionOptions(IOfficeSecurityProvider securityProvider, X509Certificate2 recipientCertificate) #Creates public-key encryption options for one recipient certificate.
Parameters
- securityProvider OfficeIMO.Security.IOfficeSecurityProvider
- recipientCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
Inherited Methods
Properties
public int RecipientCount { get; } #Number of recipient certificates the document is encrypted to.
public PdfStandardPermissions AllowedPermissions { get; set; } #Operations every recipient may perform. Defaults to all standard operations.
public bool EncryptMetadata { get; set; } #Whether document metadata streams are encrypted. Defaults to true.
public IOfficeAesCryptographyProvider? AesCryptographyProvider { get; set; } #Optional synchronous AES provider used when the host does not expose platform AES-CBC, such as browser WebAssembly.