[eluser]indapublic[/eluser]
Code:
Code:
$msg = 'My secret message';
$key = 'super-secret-key';
$this->load->library('encrypt');
$encrypted_string = $this->encrypt->encode($msg, $key);
echo "<br>encrypted_string: ";
echo $encrypted_string;
$plaintext_string = $this->encrypt->decode($encrypted_string, $key);
echo "<br>plaintext_string: ";
echo $plaintext_string;
Output:
Quote:encrypted_string: z6av2ITojqUzAgrPNlcaqqC4Evq30Z4Y6GZjfQDjHvgh+fe7e1ybLolTPQzmlXxnapVs7EnN5I1xPv8YT6h6iw==
plaintext_string:
phpinfo() output:
Quote:mcrypt
mcrypt support enabled
mcrypt_filter support enabled
Version 2.5.8
Api No 20021217
Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes cbc cfb ctr ecb ncfb nofb ofb stream
Directive Local Value Master Value
mcrypt.algorithms_dir no value no value
mcrypt.modes_dir no value no value