Page 1 of 1

function aes_encrypt and aes_decrypt

PostPosted: 01. February 2006 11:37
by zygwi
I try to use this 2 functions, but I have a fatal error : "undefined function".

Which Library must I use ?

PostPosted: 01. February 2006 11:45
by Wiedmann
You are talking about MySQL?

PostPosted: 01. February 2006 13:40
by zygwi
yes

PostPosted: 01. February 2006 13:59
by Wiedmann
Hmm, here this is working correct:
Code: Select all
E:\xampp\mysql\bin>mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 5.0.18

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SELECT AES_ENCRYPT('text', 'password');
+---------------------------------+
| AES_ENCRYPT('text', 'password') |
+---------------------------------+
| ÷¢¤¿_À°-J/¬+TfÇD                |
+---------------------------------+
1 row in set (0.15 sec)

mysql> SELECT AES_DECRYPT('÷¢¤¿_À°-J/¬+TfÇD', 'password');
+---------------------------------------------+
| AES_DECRYPT('÷¢¤¿_À°-J/¬+TfÇD', 'password') |
+---------------------------------------------+
| text                                        |
+---------------------------------------------+
1 row in set (0.00 sec)

mysql> quit
Bye

E:\xampp\mysql\bin>

PostPosted: 01. February 2006 14:08
by zygwi
OK !
I was believed that aes_encrypt and aes_decrypt were php functions !
Thank you.