Is AES encryption supported by this PHP installation?
static boolean
isSupported
()
Initialise the AES encryption object
FOFEncryptAES
__construct
(string $key, [int $strength = 256], [string $mode = 'cbc'])
-
string
$key: The encryption key (password). It can be a raw key (32 bytes) or a passphrase.
-
int
$strength: Bit strength (128, 192 or 256)
-
string
$mode: Ecnryption mode. Can be ebc or cbc. We recommend using cbc.
Decrypts a ciphertext into a plaintext string using AES
string
decryptString
(string $stringToDecrypt, [bool $base64encoded = true])
-
string
$stringToDecrypt: The ciphertext to decrypt. The first 16 bytes of the raw string must contain the IV (initialisation vector).
-
bool
$base64encoded: Should I Base64-decode the data before decryption?
Encrypts a string using AES
string
encryptString
(string $stringToEncrypt, [bool $base64encoded = true])
-
string
$stringToEncrypt: The plaintext to encrypt
-
bool
$base64encoded: Should I Base64-encode the result?