note 108418 added to function.mcrypt-cbc

From: Date: Wed, 25 Apr 2012 11:20:11 +0000
Subject: note 108418 added to function.mcrypt-cbc
Groups: php.notes 
Request: Send a blank email to php-notes+get-187333@lists.php.net to get a copy of this message
if you use blowfish and somehow when you compare strings before and after it was (usually when it's shorter than 8 or 16 bytes) you might notice the difference, it comes out that this function does not remove padding, as a result you get a bunch of nulls at the end. use $decrypted = rtrim($decrypted,"\0"); to fix it ---- Server IP: 212.199.163.163 Probable Submitter: 80.244.160.62 ---- Manual Page -- http://www.php.net/manual/en/function.mcrypt-cbc.php Edit -- https://master.php.net/note/edit/108418 Del: integrated -- https://master.php.net/note/delete/108418/integrated Del: useless -- https://master.php.net/note/delete/108418/useless Del: bad code -- https://master.php.net/note/delete/108418/bad+code Del: spam -- https://master.php.net/note/delete/108418/spam Del: non-english -- https://master.php.net/note/delete/108418/non-english Del: in docs -- https://master.php.net/note/delete/108418/in+docs Del: other reasons-- https://master.php.net/note/delete/108418 Reject -- https://master.php.net/note/reject/108418 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187333) next »