/ Published in: PHP

Here are some functions I found on the net that will allow you to easily do encryption / decryption as long as you have the mcrypt extension loaded with PHP.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<? // Encrypt Function function mc_encrypt($encrypt, $mc_key) { $passcrypt = trim(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $mc_key, trim($encrypt), MCRYPT_MODE_ECB, $iv)); return $encode; } // Decrypt Function function mc_decrypt($decrypt, $mc_key) { $decrypted = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $mc_key, trim($decoded), MCRYPT_MODE_ECB, $iv)); return $decrypted; } ?>
URL: http://www.phpsnaps.com/snaps/view/rijndael-256-bit-encryption-using-mcrypt/
Comments
