Protection
in package
Table of Contents
Properties
- $encryptionKey : string
- $lastRc4Key : string
- $lastRc4KeyC : string
- $options : array<string|int, int>
- $oValue : string
- $padding : string
- $pValue : string
- $uniqid : string
- $uniqidGenerator : UniqidGenerator
- $useRC128Encryption : bool
- $uValue : string
Methods
- __construct() : mixed
- getOValue() : mixed
- getPValue() : mixed
- getUniqid() : mixed
- getUseRC128Encryption() : mixed
- getUValue() : mixed
- objectKey() : string
- Compute key depending on object number where the encrypted data is stored
- rc4() : string
- RC4 is the standard encryption algorithm used in PDF format
- setProtection() : bool
- generateEncryptionKey() : mixed
- getProtectionBitsFromOptions() : mixed
- hexToString() : mixed
- md5toBinary() : mixed
- oValue() : mixed
- uValue() : mixed
Properties
$encryptionKey
private
string
$encryptionKey
$lastRc4Key
private
string
$lastRc4Key
$lastRc4KeyC
private
string
$lastRc4KeyC
$options
private
array<string|int, int>
$options
Array of permission => byte representation
$oValue
private
string
$oValue
$padding
private
string
$padding
$pValue
private
string
$pValue
$uniqid
private
string
$uniqid
$uniqidGenerator
private
UniqidGenerator
$uniqidGenerator
$useRC128Encryption
private
bool
$useRC128Encryption
$uValue
private
string
$uValue
Methods
__construct()
public
__construct(UniqidGenerator $uniqidGenerator) : mixed
Parameters
- $uniqidGenerator : UniqidGenerator
getOValue()
public
getOValue() : mixed
getPValue()
public
getPValue() : mixed
getUniqid()
public
getUniqid() : mixed
getUseRC128Encryption()
public
getUseRC128Encryption() : mixed
getUValue()
public
getUValue() : mixed
objectKey()
Compute key depending on object number where the encrypted data is stored
public
objectKey(int $n) : string
Parameters
- $n : int
Return values
stringrc4()
RC4 is the standard encryption algorithm used in PDF format
public
rc4(string $key, string $text) : string
Parameters
- $key : string
- $text : string
Return values
stringsetProtection()
public
setProtection([array<string|int, mixed> $permissions = [] ][, string $user_pass = '' ][, string $owner_pass = null ][, int $length = 40 ]) : bool
Parameters
- $permissions : array<string|int, mixed> = []
- $user_pass : string = ''
- $owner_pass : string = null
- $length : int = 40
Return values
boolgenerateEncryptionKey()
private
generateEncryptionKey(mixed $user_pass, mixed $owner_pass, mixed $protection) : mixed
Parameters
- $user_pass : mixed
- $owner_pass : mixed
- $protection : mixed
getProtectionBitsFromOptions()
private
getProtectionBitsFromOptions(mixed $permissions) : mixed
Parameters
- $permissions : mixed
hexToString()
private
hexToString(mixed $hs) : mixed
Parameters
- $hs : mixed
md5toBinary()
private
md5toBinary(mixed $string) : mixed
Parameters
- $string : mixed
oValue()
private
oValue(mixed $user_pass, mixed $owner_pass) : mixed
Parameters
- $user_pass : mixed
- $owner_pass : mixed
uValue()
private
uValue() : mixed