\CryptoManana\DataStructuresEncryptionLayer

Class EncryptionLayer - The encryption layer configuration object.

Summary

Methods
Properties
Constants
__construct()
__destruct()
__toString()
__get()
__set()
__isset()
__unset()
$cipher
$key
$iv
$mode
$padding
$format
No constants found
No protected methods found
$cipher
$key
$iv
$mode
$padding
$format
N/A
No private methods found
No private properties found
N/A

Properties

$cipher

$cipher : string

The cipher object name.

Type

string

$key

$key : string

The secret key.

Type

string

$iv

$iv : string

The initialization vector.

Type

string

$mode

$mode : string

The block mode.

Type

string

$padding

$padding : integer

The padding standard.

Type

integer

$format

$format : integer

The output cipher format.

Type

integer

$cipher

$cipher : string

The symmetric encryption cipher object name property storage.

Type

string — The cipher object name.

$key

$key : string

The symmetric encryption secret key property storage.

Type

string — The secret key.

$iv

$iv : string

The symmetric encryption initialization vector property storage.

Type

string — The initialization vector.

$mode

$mode : string

The symmetric encryption block mode property storage.

Type

string — The block mode.

$padding

$padding : integer

The symmetric encryption padding standard property storage.

Type

integer — The padding standard.

$format

$format : integer

The symmetric encryption output cipher format property storage.

Type

integer — The output cipher format.

Methods

__construct()

__construct(string  $cipher = '', string  $key = '', string  $iv = '', string  $mode = '', integer  $padding = 1, integer  $format = 3) 

Encryption layer configuration constructor.

Parameters

string $cipher

The cipher object name.

string $key

The secret key.

string $iv

The initialization vector.

string $mode

The block mode.

integer $padding

The padding standard.

integer $format

The output cipher format.

Throws

\Exception

Validation errors.

__destruct()

__destruct() 

Encryption layer destructor

__toString()

__toString() : string

The encryption layer string representation.

Returns

string

__get()

__get(mixed  $name) : mixed

Magic method invoked when attempting to get the value of an inaccessible or a non-existent property.

Parameters

mixed $name

The property name.

Returns

mixed —

The property value.

__set()

__set(mixed  $name, mixed  $value) 

Magic method invoked when attempting to create or modify of an inaccessible or a non-existent property.

Parameters

mixed $name

The property name.

mixed $value

The property value.

Throws

\Exception|\InvalidArgumentException

The property does not exist or is from another type.

__isset()

__isset(mixed  $name) : boolean

Magic method invoked when checking of an inaccessible or a non-existent property is set.

Parameters

mixed $name

The property name.

Returns

boolean —

The existence check result.

__unset()

__unset(mixed  $name) 

Magic method invoked when attempting to unset an inaccessible or a non-existent property.

Parameters

mixed $name

The property name.

Throws

\Exception|\LogicException

The object does not allow dynamic property removal.