CRM_Utils_Crypt
class CRM_Utils_Crypt
Methods
static string
encrypt(string $string)
Encrypts a string using AES256 in ECB mode, if encryption is enabled.
static string
decrypt(string $string)
Decrypts ciphertext encrypted with AES256 in ECB mode, if possible.
Details
at line 50
static string
encrypt(string $string)
Encrypts a string using AES256 in ECB mode, if encryption is enabled.
After encrypting the string, it is base64 encoded.
If encryption is not enabled, either due to CIVICRM_SITE_KEY being undefined or due to unavailability of the mcrypt module, the string is merely base64 encoded and is not encrypted at all.
at line 86
static string
decrypt(string $string)
Decrypts ciphertext encrypted with AES256 in ECB mode, if possible.
If the mcrypt module is not available or if CIVICRM_SITE_KEY is not set, the provided ciphertext is only base64-decoded, not decrypted.