also if I comment out $iv, I get the error  "Call to undefined function 
mcrypt_encrypt()" on that line.. I just don't understand why it keeps 
doing this.

I'm running 4.2.2

Tom Ray wrote:

> 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";
>
> ?>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to