Zeradin Posted February 24, 2010 Share Posted February 24, 2010 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 More sharing options...
roopurt18 Posted February 24, 2010 Share Posted February 24, 2010 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 More sharing options...
Zeradin Posted February 24, 2010 Author Share Posted February 24, 2010 Thanks! Working through it now! Link to comment https://forums.phpfreaks.com/topic/193261-mcrypt-mysql/#findComment-1017620 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.