\CodeIgniter\EncryptionEncryption

CodeIgniter Encryption Manager

Provides two-way keyed encryption via PHP's Sodium and/or OpenSSL extensions. This class determines the driver, cipher, and mode to use, and then initializes the appropriate encryption handler.

Summary

Methods
Properties
Constants
__construct()
initialize()
createKey()
__get()
__isset()
No public properties found
No constants found
No protected methods found
$encrypter
$driver
$key
$hmacKey
$digest
$drivers
N/A
No private methods found
No private properties found
N/A

Properties

$encrypter

$encrypter : string

The encrypter we create

Type

string

$driver

$driver : 

The driver being used

Type

$key

$key : 

The key/seed being used

Type

$hmacKey

$hmacKey : 

The derived hmac key

Type

$digest

$digest : 

HMAC digest to use

Type

$drivers

$drivers : array

Map of drivers to handler classes, in preference order

Type

array

Methods

__construct()

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

Class constructor

Parameters

\CodeIgniter\Config\BaseConfig $config

Configuration parameters

Throws

\CodeIgniter\Encryption\Exceptions\EncryptionException

createKey()

createKey(integer  $length = 32) : string

Create a random key

Parameters

integer $length

Output length

Returns

string

__get()

__get(string  $key) : mixed

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

Parameters

string $key

Property name

Returns

mixed

__isset()

__isset(string  $key) : boolean

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

Parameters

string $key

Property name

Returns

boolean