The AES_ENCRYPT
function now supports a new mode
parameter that can be set to aead
. This new aead mode significantly improves the safety of data encrypted by AES_ENCRYPT
by using an authenticated encryption algorithm. We encourage you to use this new option going forward.
AES_ENCRYPT("plaintext", CREDENTIALS.your_secret, mode: "aead")
No updates to the AES_DECRYPT
calls are necessary - it will automatically detect which mode was used for encryption and seamlessly handle decrypting your data.