|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-09-26 10:47 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 26 02:00:02 2025 UTC |
$ct=mcrypt_cbc(MCRYPT_TWOFISH128,$key,$ciphertext,MCRYPT_DECRYPT); will return a string with null characters at the end of it. This defies common sense. I end up having to run the returned string trough a for-loop to remove the null characters. i.e. for($i=0;$i<strlen($ct);$i++) { if(ord($ct[$i])!=0) $nct=$nct.$ct[$i]; } return $nct; It does not matter what type of encryption is specifed. Thanks, zend rocks so far!