mcrypt warning

From: Date: Wed, 09 Jul 2003 14:41:28 +0000
Subject: mcrypt warning
Groups: php.general 
Request: Send a blank email to php-general+get-154561@lists.php.net to get a copy of this message
Hi All, I have the following function: function encrypt ($x) { $ini = parse_ini_file ($GLOBALS['INI_PATH']); $td = mcrypt_module_open ('tripledes', '', 'ecb', ''); $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RIJNDAEL_256); mcrypt_generic_init ($td, $ini["key"], $iv); $encrypted_data = mcrypt_generic ($td, $x); mcrypt_generic_deinit ($td); mcrypt_module_close ($td); return bin2hex($encrypted_data); } I get the following PHP Warning in my logs, however, the code executes ok: [Wed Jul 9 10:25:49 2003] [error] PHP Warning: mcrypt_generic_init(): Iv size incorrect; supplied length: 0, needed: 8 in /usr/local/apache/htdocs-uat-retail/include/nocheck.iostream.class.php on line 87 I have read into mcrypt, tried a couple things, but nothing will get rid of that error. Could someone show me what I've done wrong? -Dan Joseph

« previous php.general (#154561) next »