# Encryption, Hashing and Compression Functions

- [AES\_DECRYPT](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/aes_decrypt.md): Decrypt data using AES. This function decrypts a string that was encrypted using the Advanced Encryption Standard (AES) algorithm.
- [AES\_ENCRYPT](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/aes_encrypt.md): Encrypt data using AES. This function encrypts a string using the Advanced Encryption Standard (AES) algorithm and returns a binary string.
- [COMPRESS](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/compress.md): Compress a string. This function compresses a string argument and returns the result as a binary string, useful for saving storage space.
- [DECODE](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/decode.md): Decrypt a string. This function decrypts an encrypted string using a password. It is the reverse of the ENCODE function.
- [DES\_DECRYPT](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/des_decrypt.md): Decrypt data using DES. This function decrypts a string that was encrypted using the Data Encryption Standard (DES) algorithm.
- [DES\_ENCRYPT](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/des_encrypt.md): Encrypt data using DES. This function encrypts a string using the Data Encryption Standard (DES) algorithm.
- [ENCODE](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/encode.md): Encrypt a string. This function encrypts a string using a password, returning a binary string. It is the reverse of the DECODE function.
- [ENCRYPT](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/encrypt.md): Encrypt a string using Unix crypt(). This function encrypts a string using the Unix crypt() system call, typically used for password hashing.
- [KDF](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/kdf.md): Derive a key. This function derives a key from a password using a Key Derivation Function (KDF), enhancing security for password storage.
- [MD5](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/md5.md): Calculate MD5 checksum. This function returns the MD5 hash of a string as a 32-character hexadecimal number.
- [OLD\_PASSWORD](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/old_password.md): Generate pre-4.1 password hash. This function creates a password hash compatible with the hashing method used in MySQL versions prior to 4.1.
- [PASSWORD](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/password.md): Calculate password hash. This function calculates a password hash string for a plaintext password.
- [RANDOM\_BYTES](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/random_bytes.md): Generate random bytes. This function returns a binary string of random bytes of a specified length, suitable for cryptographic use.
- [SHA1](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/sha1.md): Calculate SHA-1 checksum. This function computes the SHA-1 160-bit checksum for a string, returning a 40-character hexadecimal string.
- [SHA2](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/sha2.md): Calculate SHA-2 checksum. This function computes the SHA-2 family of hash functions (SHA-224, SHA-256, SHA-384, and SHA-512).
- [UNCOMPRESS](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/uncompress.md): Uncompress a compressed string. This function uncompresses a binary string compressed by the COMPRESS function.
- [UNCOMPRESSED\_LENGTH](/docs/server/reference/sql-functions/secondary-functions/encryption-hashing-and-compression-functions/uncompressed_length.md): Return length of uncompressed string. This function returns the length of a compressed string before it was compressed.
