The following sample shows how to use 128-bit strength to encrypt a PDF. Make sure that the option for setting PDF key length is used with an option for setting PDF password.
You can download the tool by clicking VeryPDFToobox.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Call_PDFToolBoxCom
{
class Program
{
static void Main(string[] args)
{
string strExePath = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
PDFToolBoxCom.PDFToolBoxCom p = new PDFToolBoxCom.PDFToolBoxCom();
string strReturn = p.RunCMD(strExePath + @"\1.pdf -outfile "+ strExePath + @"\1.128.pdf -ownerpassword foopass");
Console.WriteLine(strReturn);
Console.WriteLine("Please enter any key to continue...");
Console.ReadKey();
}
}
}
______________________
Lear more: VeryPDF PDF Toolbox Component for .NET.