Source
DECRYPT
Decrypts a BINARY value using a VARCHAR passphrase.
SHA1 , SHA1_HEX
This function has no corresponding decryption function. (The length of the output is independent of the length of the input. The output does not necessarily have enough bits to hold all of the information from the input, so it is not…
SHA2 , SHA2_HEX
This function has no corresponding decryption function. (The length of the output is independent of the length of the input. The output does not necessarily have enough bits to hold all of the information from the input, so it is not…
Encryption functions
…encrypt or decrypt VARCHAR or BINARY values. Function Notes ENCRYPT Encrypts VARCHAR or BINARY values using a passphrase. DECRYPT Decrypts VARCHAR or BINARY values using a passphrase.
SHA1_BINARY
This function has no corresponding decryption function. (The length of the output is independent of the length of the input. The output does not necessarily have enough bits to hold all of the information from the input, so it is not…
SHA2_BINARY
This function has no corresponding decryption function. (The length of the output is independent of the length of the input. The output does not necessarily have enough bits to hold all of the information from the input, so it is not…
TRY_DECRYPT
A special version of DECRYPT that returns a NULL value if an error occurs during decryption.
DECRYPT_RAW
The key must be a BINARY value. The key can be any value as long as the length is correct. For example, for AES128, the key must be 128 bits (16 bytes), and for AES256, the key must be 256 bits (32 bytes).
MD5 , MD5_HEX
Returns a 32 - character hex - encoded string containing the 128 - bit MD5 message digest. These functions are synonymous.
TRY_DECRYPT_RAW
A special version of DECRYPT_RAW that returns a NULL value if an error occurs during decryption.