- var_dump: documentation ( source)
- base64_encode: documentation ( source)
- md5: documentation ( source)
<?php
$key = 'aldanux';
$string = 'string to be encrypted';
$encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key))));
var_dump($encrypted);
var_dump($decrypted);