Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 1.05 KB

File metadata and controls

10 lines (8 loc) · 1.05 KB

Protect PDF document with AES in C# and VB.NET

This sample shows how to protect your PDF document with a password using the AES 256-bit encryption algorithm in C# and VB.NET.

Create an instance of the PdfStandardEncryptionHandler class with user and owner passwords. Then specify PdfEncryptionAlgorithm.Aes256Bit for the Algorithm property of the handler. Finally, assign the handler to the PdfSaveOptions.EncryptionHandler property to protect the output PDF file with advanced protection offered by AES 256-bit encryption.

See also