<?php
//Key
$key = 'secretkey';
//To Encrypt:
$encrypted = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, 'mukesh', MCRYPT_MODE_ECB);
echo $encrypted;
echo "<br>";
//To Decrypt:
$decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $encrypted, MCRYPT_MODE_ECB);
echo $decrypted;
?>
No comments:
Post a Comment