The following table describes the supported encryption and hashing functions.
| Function | Description |
|---|---|
AES_DECRYPT |
Decrypts data that has been encrypted using the AES (Advanced Encryption Standard) algorithm, returning the original plaintext. |
AES_ENCRYPT |
Encrypts data using the AES algorithm. |
ENCRYPT |
Encrypts data using Unix crypt-style encryption. This function is now considered legacy. |
MD5 |
Computes the MD5 hash of a string. |
PASSWORD |
Computes a legacy MySQL password hash, which is deprecated and shouldn’t be used for new systems. |
SHA1 |
Computes the SHA-1 hash of a string. |
SHA2 |
Computes a hash from the SHA-2 family. |
For more information, see the MySQL documentation: Encryption and Compression Functions.