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