\CodeIgniter\Encryption\HandlersOpenSSLHandler

Encryption handling for OpenSSL library

Summary

Methods
Properties
Constants
__construct()
__get()
__isset()
encrypt()
decrypt()
No public properties found
No constants found
substr()
$config
$logger
$digest
$cipher
N/A
No private methods found
No private properties found
N/A

Properties

$config

$config : string

Configuraiton passed from encryption manager

Type

string

$logger

$logger : \PSR\Log\LoggerInterface

Logger instance to record error messages and warnings.

Type

\PSR\Log\LoggerInterface

$digest

$digest : 

HMAC digest to use

Type

$cipher

$cipher : 

Cipher to use

Type

Methods

__construct()

__construct(\CodeIgniter\Config\BaseConfig  $config = null) 

Initialize OpenSSL, remembering parameters

Parameters

\CodeIgniter\Config\BaseConfig $config

Throws

\CodeIgniter\Encryption\EncryptionException

__get()

__get(string  $key) : mixed

__get() magic, providing readonly access to some of our properties

Parameters

string $key

Property name

Returns

mixed

__isset()

__isset(string  $key) : boolean

__isset() magic, providing checking for some of our properties

Parameters

string $key

Property name

Returns

boolean

encrypt()

encrypt(string  $data, array  $params = null) : string

Encrypt plaintext, with optional HMAC and base64 encoding

Parameters

string $data

Input data

array $params

Over-ridden parameters, specifically the key

Throws

\CodeIgniter\Encryption\EncryptionException

Returns

string

decrypt()

decrypt(string  $data, array  $params = null) : string

Decrypt ciphertext, with optional HMAC and base64 encoding

Parameters

string $data

Encrypted data

array $params

Over-ridden parameters, specifically the key

Throws

\CodeIgniter\Encryption\EncryptionException

Returns

string

substr()

substr(string  $str, integer  $start, integer  $length = null) : string

Byte-safe substr()

Parameters

string $str
integer $start
integer $length

Returns

string