SecurityUtils
in package
A utility class for carrying out various security tasks.
Tags
Table of Contents
Properties
- $cipher : string
- The HTTP user-agent client string.
Methods
- checkAdminPasswordIsDefault() : bool
- Checks to see if the admin password provided matches the default admin password in the config file.
- decrypt() : string
- Decrypt provided data using AES 256 algorithm and the security.encryption.key.
- encrypt() : string
- Encrypt provided data using AES 256 algorithm and the security.encryption.key.
Properties
$cipher
The HTTP user-agent client string.
public
static string
$cipher
= "aes-256-ecb"
Tags
Methods
checkAdminPasswordIsDefault()
Checks to see if the admin password provided matches the default admin password in the config file.
public
static checkAdminPasswordIsDefault(string $password) : bool
Parameters
- $password : string
-
The encrypted admin password stored in the database.
Tags
Return values
booldecrypt()
Decrypt provided data using AES 256 algorithm and the security.encryption.key.
public
static decrypt(string $data[, string $key = '' ]) : string
Parameters
- $data : string
- $key : string = ''
-
Optional, if provided use this as the key rather than the security.encryption.key setting.
Tags
Return values
stringencrypt()
Encrypt provided data using AES 256 algorithm and the security.encryption.key.
public
static encrypt(string $data[, string $key = '' ]) : string
Parameters
- $data : string
- $key : string = ''
-
Optional, if provided use this as the key rather than the security.encryption.key setting.