setasign\FpdiPdfParser\PdfParser\SecHandler
Standard Implementation for decryption of Standard PDF security.
File: /FPDI PDF-Parser v2/PdfParser/SecHandler/Standard.php
Class hierarchy
Summary
Methods
- __construct()
- auth()
- authByOwnerPassword()
- authByUserPassword()
- computeEncryptionKey()
- computeHashR6()
- computeUValue()
- createEncryptionKeyByOwnerPassword()
- createEncryptionKeyByUserPassword()
- decrypt()
- decryptEncryptionKeyR5R6()
- decryptStream()
- decryptString()
- getAuthMode()
- getEncryptionDictionary()
- getRevision()
- isAuth()
- isMetadataEncrypted()
Constants
AES
Encryption constant
AES_128
Encryption constant
AES_256
Encryption constant
ARCFOUR
Encryption constant
OWNER
Owner auth mode
USER
User auth mode
Static Properties
Properties
$encryptionKey
The encryption key
$fileIdentifier
Static Methods
arcfour()
checkCipherSupport()
ensurePasswordEncoding()
This method ensures the correct encoding of a password.
Internally the password is converted into the required encoding for the desired revision, and it is processed with the SASLprep profile if required.
Parameters
- $revision: int
- $password: string
The password in UTF-8 encoding.
Exceptions
Throws SecHandlerException
factory()
\setasign\Fpdi\PdfParser\Type\PdfDictionary $encryptionDictionary
Parameters
- $parser: \setasign\FpdiPdfParser\PdfParser\PdfParser
- $encryptionDictionary: \setasign\Fpdi\PdfParser\Type\PdfDictionary
Exceptions
Throws \setasign\Fpdi\PdfParser\PdfParserException
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException
Throws SecHandlerException
Throws \setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException
Methods
__construct()
\setasign\Fpdi\PdfParser\Type\PdfDictionary $encryptionDictionary
Parameters
- $parser: \setasign\FpdiPdfParser\PdfParser\PdfParser
- $encryptionDictionary: \setasign\Fpdi\PdfParser\Type\PdfDictionary
Exceptions
Throws SecHandlerException
Throws \setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException
auth()
Parameters
- $password: ?string
The password in UTF-8 encoding
Exceptions
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException
Throws SecHandlerException
authByOwnerPassword()
Parameters
- $password: string
The owner-password in UTF-8 encoding
Exceptions
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException
Throws SecHandlerException
authByUserPassword()
Parameters
- $password: string
The user-password in UTF-8 encoding
Exceptions
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException
Throws SecHandlerException
computeHashR6()
string $inputPassword,
string $userKey = ''
Parameters
- $data: string
- $inputPassword: string
- $userKey: string
createEncryptionKeyByOwnerPassword()
Parameters
- $ownerPassword: string
Exceptions
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException
Throws SecHandlerException
decrypt()
array $algorithm,
int $objectNumber,
int $generationNumber
Parameters
- $data: string
- $algorithm: array
- $objectNumber: int
- $generationNumber: int
Exceptions
Throws SecHandlerException
decryptStream()
Parameters
- $data: string
- $objectNumber: int
- $generationNumber: int
Exceptions
Throws SecHandlerException
decryptString()
Parameters
- $data: string
- $objectNumber: int
- $generationNumber: int
Exceptions
Throws SecHandlerException
isAuth()
Checks for authentication and tries to authenticate without arguments through the auth() method.
