Syntax
Parameters
-
str(Required): the string to decrypt. It must be of the VARCHAR type. -
key_str(Required): the key used to encryptstr. It must be of the VARCHAR type. -
init_vector(Optional): Initialization Vector (IV): A crucial security parameter in AES encryption that ensures identical plaintexts yield distinct ciphertexts. It is only utilized in CBC, CFB, OFB, CTR, and GCM modes. It must be of the VARCHAR type. -
encryption_mode(Optional): The encryption algorithm. It must be of the VARCHAR type. Default value:AES_128_ECB. Supported algorithms: -
aad_str(Optional): Denotes Additional Authenticated Data (AAD). This is a parameter unique to authenticated encryption modes (e.g., GCM). It allows for including data that must be authenticated for integrity (preventing tampering) but does not require confidentiality (it remains unencrypted). It must be of the VARCHAR type.
Return value
Returns a value of the VARCHAR type. If the input is invalid, NULL is returned.Examples
Decode a Base64 string and use this function to decrypt the decoded string into the original string.Text