setasign\FpdiPdfParser\PdfParser\SecHandler
Standard Implementation for decryptiong 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
$encryptionDictionary
The encryption dictionary
$encryptionKey
The encryption key
$fileIdentifier
Static Methods
aesDecrypt()
Parameters
- $key : string
- $data : string
- $bits : string
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 pocessed with the SASLprep profile if requried.
Parameters
- $revision : int
- $password : string
The password in UTF-8 encoding.
Exceptions
Throws SecHandlerException
factory()
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()
Parameters
- $parser : \setasign\FpdiPdfParser\PdfParser\PdfParser
- $encryptionDictionary : \setasign\Fpdi\PdfParser\Type\PdfDictionary
Exceptions
Throws SecHandlerException
Throws \setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException
Throws \setasign\Fpdi\PdfParser\PdfParserException
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException
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()
Parameters
- $data : string
- $inputPassword : string
- $userKey : string
createEncryptionKeyByOwnerPassword()
Parameters
- $ownerPassword : string
Exceptions
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException
Throws SecHandlerException
createEncryptionKeyByUserPassword()
Parameters
- $userPassword : string
Exceptions
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException
decrypt()
Parameters
- $data : string
- $algorithm : array
- $objectNumber : int
- $generationNumber : int
Exceptions
Throws SecHandlerException
decryptEncryptionKeyR5R6()
Parameters
- $value : string
- $key : string
Exceptions
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException
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.
isMetadataEncrypted()
Checks whether metadata is encrypted or not.
Exceptions
Throws \setasign\Fpdi\PdfParser\Type\PdfTypeException