Documentation

AesCbcCryptor extends Cryptor
in package
uses PaddingTrait

Table of Contents

Constants

BLOCK_SIZE  = 16
CIPHER_ALGO  = 'aes-256-cbc'
CRYPTOR_ID  = 'ACRH'
IV_LENGTH  = 16

Properties

$cipherKey  : string

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
getSecret()  : string

Constants

Properties

Methods

__construct()

public __construct(string $cipherKey) : mixed
Parameters
$cipherKey : string

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([mixed $cipherKey = null ]) : string
Parameters
$cipherKey : mixed = null
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

getSecret()

protected getSecret(string $cipherKey) : string
Parameters
$cipherKey : string
Return values
string

        
On this page

Search results