PdfEncryptionLevel Struct
Represents a symmetric encryption algorithm used in a PDF file and the length of the encryption key used in that algorithm.
public struct PdfEncryptionLevel : IEquatable<PdfEncryptionLevel>
Public Structure PdfEncryptionLevel
Implements IEquatable(Of PdfEncryptionLevel)
Implements
Constructors
PdfEncryptionLevel(PdfEncryptionAlgorithm, Int32)
Initializes a new instance of the PdfEncryptionLevel structure.
public PdfEncryptionLevel(PdfEncryptionAlgorithm algorithm, int keyLength)
Public Sub New(algorithm As PdfEncryptionAlgorithm, keyLength As Integer)
Parameters
algorithm
- PdfEncryptionAlgorithm
The symmetric encryption algorithm.
keyLength
- System.Int32
The length of the encryption key (in bits) used in the algorithm
.
Fields
AES_128
The 128-bit AES encryption level.
Compatible with PDF_1_6.
public static readonly PdfEncryptionLevel AES_128
Public Shared ReadOnly AES_128 As PdfEncryptionLevel
Field Value
AES_256
The 256-bit AES encryption level.
Compatible with PDF_1_7 using Adobe's extension level 8 or with PDF_2_0.
public static readonly PdfEncryptionLevel AES_256
Public Shared ReadOnly AES_256 As PdfEncryptionLevel
Field Value
RC4_128
The 128-bit RC4 encryption level.
public static readonly PdfEncryptionLevel RC4_128
Public Shared ReadOnly RC4_128 As PdfEncryptionLevel
Field Value
RC4_40
The 40-bit RC4 encryption level.
public static readonly PdfEncryptionLevel RC4_40
Public Shared ReadOnly RC4_40 As PdfEncryptionLevel
Field Value
Properties
Algorithm
Gets the symmetric encryption algorithm.
public readonly PdfEncryptionAlgorithm Algorithm { get; }
Public ReadOnly Property Algorithm As PdfEncryptionAlgorithm
Property Value
The symmetric encryption algorithm.
KeyLength
Gets the length of the encryption key (in bits) used in the Algorithm.
Property Value
- System.Int32
The length of the encryption key (in bits) used in the Algorithm.
Methods
Equals(PdfEncryptionLevel)
Determines whether the specified PdfEncryptionLevel is equal to this PdfEncryptionLevel instance.
public bool Equals(PdfEncryptionLevel other)
Public Function Equals(other As PdfEncryptionLevel) As Boolean
Parameters
other
- PdfEncryptionLevel
The PdfEncryptionLevel to compare with this PdfEncryptionLevel instance.
Returns
- System.Boolean
true if the specified PdfEncryptionLevel is equal to this PdfEncryptionLevel instance; otherwise, false.
Equals(Object)
Determines whether the specified System.Object is equal to this PdfEncryptionLevel instance.
public override bool Equals(object obj)
Public Overrides Function Equals(obj As Object) As Boolean
Parameters
obj
- System.Object
The System.Object to compare with this PdfEncryptionLevel instance.
Returns
- System.Boolean
true if the specified System.Object is equal to this PdfEncryptionLevel instance; otherwise, false.
Overrides
GetHashCode()
Returns a hash code for this PdfEncryptionLevel instance.
Returns
- System.Int32
A hash code for this PdfEncryptionLevel instance, suitable for use in hashing algorithms and data structures like a hash table.
Overrides
ToString()
Returns a System.String that represents this PdfEncryptionLevel instance.
Returns
- System.String
A System.String that represents this PdfEncryptionLevel instance.
Overrides
Remarks
This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).
Operators
Equality(PdfEncryptionLevel, PdfEncryptionLevel)
Determines whether first
and second
PdfEncryptionLevels are equal.
public static bool operator ==(PdfEncryptionLevel first, PdfEncryptionLevel second)
Public Shared Operator =(first As PdfEncryptionLevel, second As PdfEncryptionLevel) As Boolean
Parameters
first
- PdfEncryptionLevel
The first PDF encryption level.
second
- PdfEncryptionLevel
The second PDF encryption level.
Returns
- System.Boolean
true if first
and second
PDF encryption levels are equal; otherwise, false.
Inequality(PdfEncryptionLevel, PdfEncryptionLevel)
Determines whether first
and second
PdfEncryptionLevels are not equal.
public static bool operator !=(PdfEncryptionLevel first, PdfEncryptionLevel second)
Public Shared Operator <>(first As PdfEncryptionLevel, second As PdfEncryptionLevel) As Boolean
Parameters
first
- PdfEncryptionLevel
The first PDF encryption level.
second
- PdfEncryptionLevel
The second PDF encryption level.
Returns
- System.Boolean
true if first
and second
PDF encryption levels are not equal; otherwise, false.