Documentation

LegacyCryptor extends Cryptor
in package
uses PaddingTrait

Table of Contents

Constants

BLOCK_SIZE  = 16
CIPHER_ALGO  = 'aes-256-cbc'
CRYPTOR_ID  = '0000'
IV_LENGTH  = 16
STATIC_IV  = '0123456789012345'

Properties

$cipherKey  : string
$useRandomIV  : bool

Methods

__construct()  : mixed
decrypt()  : mixed
depad()  : string
Remove padding from $text using PKCS5Padding schema
encrypt()  : Payload
getCipherKey()  : string
getIV()  : string
pad()  : string
Pad $text to multiple of $blockSize lenght using PKCS5Padding schema

Constants

Properties

Methods

__construct()

public __construct(string $key, bool $useRandomIV) : mixed
Parameters
$key : string
$useRandomIV : bool

decrypt()

public decrypt(Payload $payload[, string|null $cipherKey = null ]) : mixed
Parameters
$payload : Payload
$cipherKey : string|null = null

depad()

Remove padding from $text using PKCS5Padding schema

public depad(mixed $data, int $blockSize) : string
Parameters
$data : mixed
$blockSize : int
Return values
string

encrypt()

public encrypt(string $text[, string|null $cipherKey = null ]) : Payload
Parameters
$text : string
$cipherKey : string|null = null
Return values
Payload

getCipherKey()

public getCipherKey() : string
Return values
string

pad()

Pad $text to multiple of $blockSize lenght using PKCS5Padding schema

public pad(string $text, int $blockSize) : string
Parameters
$text : string
$blockSize : int
Return values
string

        
On this page

Search results