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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php