Table of Contents

Class PdfCryptFilter

Namespace
PdfSharp.Pdf.Security
Assembly
PdfSharp.dll

Represents a crypt filter dictionary as written into the CF dictionary of a security handler (PDFCryptFilters).

public class PdfCryptFilter : CryptFilterBase, ICloneable, IEnumerable<KeyValuePair<string, PdfItem?>>, IEnumerable
Inheritance
PdfCryptFilter
Implements
Inherited Members

Constructors

PdfCryptFilter(PdfStandardSecurityHandler?)

Initializes a new instance of the PdfCryptFilter class.

public PdfCryptFilter(PdfStandardSecurityHandler? parentStandardSecurityHandler)

Parameters

parentStandardSecurityHandler PdfStandardSecurityHandler

The parent standard security handler.

Methods

Initialize(PdfStandardSecurityHandler?)

Initializes _parentStandardSecurityHandler to do the correct interpretation of the length key.

public void Initialize(PdfStandardSecurityHandler? parentStandardSecurityHandler)

Parameters

parentStandardSecurityHandler PdfStandardSecurityHandler

SetAuthEventForEmbeddedFiles()

Sets the AuthEvent Key to /EFOpen, in order authenticate embedded file streams when accessing the embedded file.

public void SetAuthEventForEmbeddedFiles()

SetEncryptionToAESForV4()

Encrypt with AES and a file encryption key length of 128 bits, using the algorithms of encryption V4 (PDF 1.6).

public void SetEncryptionToAESForV4()

SetEncryptionToAESForV5()

Encrypt with AES and a file encryption key length of 256 bits, using the algorithms of encryption V5 (PDF 2.0).

public void SetEncryptionToAESForV5()

SetEncryptionToNone()

The encryption shall be handled by the security handler.

public void SetEncryptionToNone()

SetEncryptionToRC4ForV4(int)

Encrypt with RC4 and the given file encryption key length, using the algorithms of encryption V4 (PDF 1.5). For encryption V4 the file encryption key length shall be 128 bits.

public void SetEncryptionToRC4ForV4(int length = 128)

Parameters

length int

The file encryption key length - a multiple of 8 from 40 to 256 bit.