note 15937 added to ref.mcrypt
| From: | claus dot pruefer at yoc dot de | Date: | Tue, 09 Oct 2001 12:54:22 +0000 |
| Subject: | note 15937 added to ref.mcrypt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18722@lists.php.net to get a copy of this message | ||
we have php 4.0.6 (with memory limit fix) and mcrypt 2.5.5 installed.
$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_Blowfish, MCRYPT_MODE_ECB), MCRYPT_RAND);
$dbaccount_number = base64_encode(mcrypt_encrypt(MCRYPT_Blowfish, $key, $dbaccount_number,
MCRYPT_MODE_ECB, $iv));
this code works fine. many other MCRYPT functions mentioned in the PHP.net manual generate strange
error-codes!?!
and we use base64encoding for safe transport over POST or GET method because the mcrypt-output seems
to be more than 8bit wide.
hopefully we helped a bit using MCRYPT with PHP...
--
http://www.php.net/manual/en/ref.mcrypt.php
http://master.php.net/manage/user-notes.php?action=edit+15937
http://master.php.net/manage/user-notes.php?action=delete+15937
http://master.php.net/manage/user-notes.php?action=reject+15937