phpdftk API Documentation

AesCipher
in package
implements CryptInterface

FinalYes

AES-CBC cipher for PDF encryption (ISO 32000-2 §7.6.3).

Supports 128-bit and 256-bit keys. The 16-byte IV is prepended to the ciphertext on encrypt and stripped on decrypt, per the PDF spec requirement that each encrypted string/stream carries its own IV.

Table of Contents

Interfaces

CryptInterface
Symmetric cipher contract for PDF stream/string encryption.

Methods

__construct()  : mixed
decrypt()  : string
encrypt()  : string

Methods

__construct()

public __construct([int $keyBits = 128 ]) : mixed
Parameters
$keyBits : int = 128

decrypt()

public decrypt(string $data, string $key) : string
Parameters
$data : string
$key : string
Return values
string

encrypt()

public encrypt(string $data, string $key) : string
Parameters
$data : string
$key : string
Return values
string

        
On this page

Search results