I dipped into mcrypt about a month or so, and did this script back then. 
I had it working, it would kick out the encrypted data for me but today 
when I test it I get a Fatal error: Call to undefined function: 
mcrypt_create_iv() in test2.php on line 3.
And I don't understand why...any help would be great...thanks!

<?

$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_TripleDES, 
MCRYPT_MODE_CFB), MCRYPT_RAND);

$key = "Secret";
$sample2 = "Hello";
$sample3 = "Hello There";

$lockdata = mcrypt_encrypt (MCRYPT_TripleDES, $key, $sample2, 
MCRYPT_MODE_CFB, $iv);
$test = mcrypt_encrypt (MCRYPT_TripleDES, $key, $sample3, 
MCRYPT_MODE_CFB, $iv);
echo "$lockdata<br>\n";
echo "$test\n";

?>

Reply via email to