I called aes_encrypt($form_values['number']) in my custom module and the data was saved encrypted. When calling aes_decrypt($value['number']) the value in the database
was retrieved decrypted successfully, but the following warning message displayed on the screen. I could not figure what caused the warning message. For the time being I suppressed the warning message by adding slight modification on line 511 in aes.module
$decrypted = @mdecrypt_generic($td, $string);
warning: mdecrypt_generic() [function.mdecrypt-generic]: An empty string was passed in C:\pathtowebdirectory\mysite\sites\all\modules\aes\aes.module on line 511.