Another Encryption question
| From: | Tom Ray | Date: | Tue, 24 Sep 2002 01:21:22 +0000 |
| Subject: | Another Encryption question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117339@lists.php.net to get a copy of this message | ||
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";
?>