PdfRpt.FluentInterface.EncryptedFileBuilder.WithPassword C# (CSharp) Method

WithPassword() public method

Using the AES algorithm to encrypt the pdf file.
public WithPassword ( string editPassword, string readPassword = "" ) : void
editPassword string The owner password. It can't be null, otherwise these settings will be ignored.
readPassword string The user password. It can be null.
return void
        public void WithPassword(string editPassword, string readPassword = "")
        {
            _encryptionPreferences.EncryptionType = EncryptionType.PasswordEncryption;
            _encryptionPreferences.PasswordEncryption = new PasswordEncryption
            {
                ReadPassword = readPassword,
                EditPassword = editPassword
            };
        }