|
Posted by Steve on 10/15/47 11:29
> As I said, the data is decrypted fine. But this error keeps popping
> up...
Suggestions:
> $ivector = mcrypt_create_iv(mcrypt_get_iv_size($cipher,$mode),$rand_src);
Break this down into two calls, and check that the size returned from
the first call is what you expect.
$ivsize = mcrypt_get_iv_size($cipher,$mode);
// [ check/debug $ivsize before use ]
$ivector = mcrypt_create_iv($ivsize,$rand_src);
Use <http://www.php.net/manual/en/function.mcrypt-enc-get-iv-size.php>
instead to see if it makes a difference.
$handle = mcrypt_module_open($cipher, '', $mode, '');
if(!$handle) die ("Couldn't locate open mcrypt module.");
$ivsize = mcrypt_enc_get_iv_size($handle);
// [ check/debug $ivsize before use ]
$ivector = mcrypt_create_iv($ivsize,$rand_src);
Or suppress the warning as you suggest, as it seems harmless 8-)
---
Steve
Navigation:
[Reply to this message]
|