encrypt method와 decrypt method의 경우, key 길이가 128bit(16byte)이면 MySQL과 MariaDB의 AES_ENCRYPT/AES_DECRYPT 함수와 완벽하게 호환이 된다.
key 길이가 192또는 256bit일 경우에는 oops에서 제공하는 lib_mysqludf_aes256 UDF에서 제공하는 AES256_ENCRYPT, AES256_DECRYPT와 완변하게 호환이 된다.
예제:
[line 61]
mcrypt takes precedence over openssl.
static string decrypt( string $cipher, string $key)
This method is compatible AES_DECRYPT function of mysql, if key is 128 bit And then, If key is 192 or 256 bit, this method is compatible follow APIS:
static string encrypt( string $cipher, string $key)
This method is compatible AES_ENCRYPT function of mysql, if key is 128 bit. And then, If key is 192 or 256 bit, this method is compatible follow APIS:
static string hex( string $v)
This method is compatible HEX function of mysql
Example:
static string unhex( string $v)
This method is compatible UNHEX function of mysql
mysqlAES __construct( )
[line 52]