/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private $_key='some key'; /** * Encrypt using mcrypt * * Value is encrypted with mcrypt and base64 * * @param mixed $val Can be string or int * @return string Encoded value */ function mcryptEncode($val) { return $benc; } /** * Decrypt using mcrypt * * Takes value encrypted with mcrypt and base64 and decrypts * * @param string $benc Encrypted mcrypt and base64 value * @return string Decoded value */ function mcryptDecode($benc) { return $dec; }