mike-22 wrote:
> 
> just hard code the IV in both places.
> 

Thanks for the link, that was most useful, especially the commented bits!

RE: The IV, reading the php manual it states that the IV is not used when
ECB mode is used (which is what we are using). So knowing this does the use
of IV matter? I stripped the decrypt routine from the PHP file (big file!)
and tried it on a seperate PHP page without parsing a IV like so:

mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$key,$mcryptData,MCRYPT_MODE_ECB,""); 

While i got an error from the module:

Warning:  mcrypt_decrypt() [function.mcrypt-decrypt]: The IV parameter must
be as long as the blocksize in crypto.php on line 38

It still decrypted it fine on the php page.
-- 
View this message in context: 
http://www.nabble.com/Converting-PHP-code-to-C---tf4397727.html#a12575594
Sent from the PHP - General mailing list archive at Nabble.com.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to