PDFsharp-net6

CryptFilterBase

Namespace: PdfSharp.Pdf.Security

Abstract class declaring the common methods of crypt filters. These may be the IdentityCryptFilter or PdfCryptFilters defined in the CF dictionary of the security handler.

public abstract class CryptFilterBase : PdfSharp.Pdf.PdfDictionary, System.ICloneable, System.Collections.Generic.IEnumerable`1[[System.Collections.Generic.KeyValuePair`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[PdfSharp.Pdf.PdfItem, PdfSharp, Version=0.1.3.0, Culture=neutral, PublicKeyToken=null]], System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], System.Collections.IEnumerable

Inheritance ObjectPdfItemPdfObjectPdfDictionaryCryptFilterBase
Implements ICloneable, IEnumerable<KeyValuePair<String, PdfItem>>, IEnumerable

Properties

Elements

Gets the dictionary containing the elements of this dictionary.

public DictionaryElements Elements { get; }

Property Value

DictionaryElements

Stream

Gets or sets the PDF stream belonging to this dictionary. Returns null if the dictionary has no stream. To create the stream, call the CreateStream function.

public PdfStream Stream { get; set; }

Property Value

PdfStream

Owner

Gets the PdfDocument this object belongs to.

public PdfDocument Owner { get; }

Property Value

PdfDocument

IsIndirect

Indicates whether the object is an indirect object.

public bool IsIndirect { get; }

Property Value

Boolean

Internals

Gets the PdfInternals object of this document, that grants access to some internal structures which are not part of the public interface of PdfDocument.

public PdfObjectInternals Internals { get; }

Property Value

PdfObjectInternals

Reference

Gets the indirect reference of this object. If the value is null, this object is a direct object.

public PdfReference Reference { get; internal set; }

Property Value

PdfReference

ReferenceNotNull

Gets the indirect reference of this object. Throws if it is null.

public PdfReference ReferenceNotNull { get; }

Property Value

PdfReference

Exceptions

InvalidOperationException
The indirect reference must be not null here.

Methods

EncryptForEnteredObject(Byte[]&)

Encrypts the given bytes. Returns true if the crypt filter encrypted the bytes, or false, if the security handler shall do it.

internal abstract bool EncryptForEnteredObject(Byte[]& bytes)

Parameters

bytes Byte[]&

Returns

Boolean

DecryptForEnteredObject(Byte[]&)

Decrypts the given bytes. Returns true if the crypt filter decrypted the bytes, or false, if the security handler shall do it.

internal abstract bool DecryptForEnteredObject(Byte[]& bytes)

Parameters

bytes Byte[]&

Returns

Boolean