Edit report at http://bugs.php.net/bug.php?id=52930&edit=1
ID: 52930 User updated by: martin at appware dot co dot uk Reported by: martin at appware dot co dot uk Summary: Engine not responding to code properly Status: Open Type: Bug Package: Scripting Engine problem Operating System: Windows 7 Business PHP Version: 5.3.3 Block user comment: N New Comment: http://pastebin.com/NQByiELh Updated the test script to fix a E_NOTICE bug, The PHP Error still occurs though Previous Comments: ------------------------------------------------------------------------ [2010-09-27 09:55:08] martin at appware dot co dot uk Description: ------------ cipher using php code to allow 2 way encryption currently it uses a predefined array of Char's it then loops though this and creates every cipher possible by shifting the first char to the end in a new array, and as it ciphers one letter the cipher moves forward on cipher it's using No my problem is that i have had to place a check in to make sure the cipher has finished if it has and the decrypted cipher is not the same as the original string rerun the cipher with the same string, Now this should not be needed, also this still creates error's This has been tested in php 5.3.1 and 5.3.3, The occurrence the same some times refreshing the system give a cipher that's to short for the string and this is with the check whats more annoying is that there is a check in the code to prevent this happening as it was happening more and more P.S now i got to re-random my cipher base as its useless one made public haha Test script: --------------- http://pastebin.com/r934gLpM inside encryptString you will see if($this->decryptString($encoded) === $string){ return $encoded; }else{ return $this->encryptString($string); } at the end it should not be possible for me to get a string thats dose not break back. Expected result: ---------------- The cipher to not occasionally return a string that is to short Actual result: -------------- Using the code above works but keep refreshing it and you will see you will get ciphers back that are 2 small a common one for me is "LX" on its own. this happens more and more with a bigger string in the $secure->encryptString ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52930&edit=1