PdfEncryption class

PDF encryption handler.

Supports RC4 and basic AES encryption detection and decryption.

Constructors

PdfEncryption({required PdfDict encryptDict, required Uint8List documentId})

Properties

algorithm int
Determine the encryption algorithm in use.
no setter
canAnnotate bool
no setter
canCopy bool
no setter
canModify bool
no setter
canPrint bool
Check permissions.
no setter
documentId Uint8List
Document ID (from trailer /ID array).
final
encryptDict PdfDict
Encryption dictionary.
final
hashCode int
The hash code for this object.
no setterinherited
isAES bool
Whether the document uses AES encryption.
no setter
isAuthenticated bool
Check if authenticated.
no setter
isEncrypted bool
Check if encryption is present.
no setter
keyLength int
Key length in bits.
no setter
ownerHash Uint8List
Owner password hash.
no setter
permissions int
Permission flags.
no setter
revision int
Revision number.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userHash Uint8List
User password hash.
no setter
version int
Algorithm version.
no setter

Methods

authenticate(String password) bool
Try to authenticate with a password. Returns true if successful.
decrypt(Uint8List data, int objectNumber, int generation) Uint8List
Decrypt an object's data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

algorithmAES_128 → const int
algorithmAES_256 → const int
algorithmNone → const int
Encryption algorithm constants.
algorithmRC4_40 → const int
algorithmRC4_128 → const int
permAccessibility → const int
permAnnot → const int
permAssemble → const int
permCopy → const int
permFillForms → const int
permModify → const int
permPrint → const int
Permission flags.
permPrintHigh → const int