Encryption
extends BaseConfig
in package
Encryption configuration.
These are the settings used for encryption, if you don't pass a parameter array to the encrypter for creation/initialization.
Table of Contents
Properties
- $authKeyInfo : string
- Authentication key info.
- $blockSize : int
- -------------------------------------------------------------------------- SodiumHandler's Padding Length in Bytes --------------------------------------------------------------------------
- $cipher : string
- Cipher to use.
- $digest : string
- -------------------------------------------------------------------------- Encryption digest --------------------------------------------------------------------------
- $driver : string
- -------------------------------------------------------------------------- Encryption Driver to Use --------------------------------------------------------------------------
- $encryptKeyInfo : string
- Encryption key info.
- $key : string
- -------------------------------------------------------------------------- Encryption Key Starter --------------------------------------------------------------------------
- $rawData : bool
- Whether the cipher-text should be raw. If set to false, then it will be base64 encoded.
Properties
$authKeyInfo
Authentication key info.
public
string
$authKeyInfo
= ''
This setting is only used by OpenSSLHandler.
Set to 'authentication' for CI3 Encryption compatibility.
$blockSize
-------------------------------------------------------------------------- SodiumHandler's Padding Length in Bytes --------------------------------------------------------------------------
public
int
$blockSize
= 16
This is the number of bytes that will be padded to the plaintext message before it is encrypted. This value should be greater than zero.
See the user guide for more information on padding.
$cipher
Cipher to use.
public
string
$cipher
= 'AES-256-CTR'
This setting is only used by OpenSSLHandler.
Set to 'AES-128-CBC' to decrypt encrypted data that encrypted by CI3 Encryption default configuration.
$digest
-------------------------------------------------------------------------- Encryption digest --------------------------------------------------------------------------
public
string
$digest
= 'SHA512'
HMAC digest to use, e.g. 'SHA512' or 'SHA256'. Default value is 'SHA512'.
$driver
-------------------------------------------------------------------------- Encryption Driver to Use --------------------------------------------------------------------------
public
string
$driver
= 'OpenSSL'
One of the supported encryption drivers.
Available drivers:
- OpenSSL
- Sodium
$encryptKeyInfo
Encryption key info.
public
string
$encryptKeyInfo
= ''
This setting is only used by OpenSSLHandler.
Set to 'encryption' for CI3 Encryption compatibility.
$key
-------------------------------------------------------------------------- Encryption Key Starter --------------------------------------------------------------------------
public
string
$key
= ''
If you use the Encryption class you must set an encryption key (seed). You need to ensure it is long enough for the cipher and mode you plan to use. See the user guide for more info.
$rawData
Whether the cipher-text should be raw. If set to false, then it will be base64 encoded.
public
bool
$rawData
= true
This setting is only used by OpenSSLHandler.
Set to false for CI3 Encryption compatibility.