RE: [PHP] Another Encryption question
| From: | John Holmes | Date: | Tue, 24 Sep 2002 02:22:23 +0000 |
| Subject: | RE: [PHP] Another Encryption question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117354@lists.php.net to get a copy of this message | ||
Look at a phpinfo() page, do you have mcrypt installed? I'd have to
guess no, because that's generally how you get this error.
---John Holmes...
> -----Original Message-----
> From: Tom Ray [mailto:tom@blazestudios.com]
> Sent: Monday, September 23, 2002 10:15 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Another Encryption question
>
> 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