Jump to content

mcrypt -> mysql


Zeradin

Recommended Posts

I am doing a mcrypt and storing the iv and key in a table.

it works a lot of the time but sometimes i get this:

Warning: mcrypt_generic_init() [function.mcrypt-generic-init]: Iv size incorrect; supplied length: 31, needed: 32 in /home/hypboard/public_html/geoffguidetti.com/cc/includes/functions.php  on line 40

I have iv set to varchar(200)

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/193261-mcrypt-mysql/
Share on other sites

This has nothing to do with MySQL.  Nor does it have anything to do with the size of your column.

 

This error is occurring during your call to mcrypt_generic_init(), which I'm assuming has to happen before your code even begins to interact with MySQL.

 

Googling on your error came up with a work-around:

http://qaix.com/php-web-programming/330-604-mcrypt-generic-init-iv-size-incorrect-read.shtml

 

 

Google also came up with a possible explanation, that I didn't bother to read:

http://www.oceanofstones.net/mcrypt-problem.php

 

Link to comment
https://forums.phpfreaks.com/topic/193261-mcrypt-mysql/#findComment-1017619
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.