AES_DECRYPT()
AES_DECRYPT(string,password)
This function decrypts text that was encrypted using the Advanced Encryption Standard (AES) algorithm with a
128-bit key length, reversing the
AES_ENCRYPT() function. The function unlocks
the encrypted string with the password given as the second argument.
It returns NULL if one of the given parameters is NULL. This is
available as of version 4.0.2 of MySQL. Here is an example:
SELECT AES_DECRYPT(personal, 'my_password') AS Personal FROM teachers WHERE teacher_id='730522'; +----------+ | Personal | +----------+ | text | +----------+
In this example, the value for the personal
column is decrypted using the password given. The result is just the
plain text of the column.