Hello,
How can I encrypt and decrypt a session variable using salt, what do I need to set in the header? I tried this but got error about unknow function mcrypt_ecrypt. Any ideas to help.
function encrypt($text, $SALT=null) {
$SALT=SECURE_KEY;
return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SALT, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));
}
Thanks