|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-02-19 01:44 UTC] niall dot ocallaghan at gmail dot com
Description: ------------ When attempting to encrypt a JSON encoded string using a secret key, I get inconsistent results depending on the data and the key I used. I have managed to recreate this and believe it is an issue with the mcrypt module. The JSON string is 303 characters in length, and simply by changing on character from a 6 to a 7, it fixes the problem. I have included a URL for reproducing this error Reproduce code: --------------- http://78.137.160.50/fcl/bug.txt Please note in the above code I have given two example strings. The first does not work (and is a reproduction of this bug), the second does. They are identical strings except for the character at position 297. I changed the 6 to a 7 and it fixes the problem Expected result: ---------------- I expect to see a decrypted value of the string. Actual result: -------------- I see 99% of the string has been decrypted however the last few characters are corrupt. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 01:00:02 2025 UTC |
I can reproduce it on Linux. {"fg_class_name":"Match","fg_client_api":"d26ec6a426b128c7001a7292a2ad1c0929cd64d7","fg_client_id":1,"fg_direction":"desc","fg_extras":{"GameWeekId":"1"},"fg_method_name":"getMatches","fg_page":1,"fg_request_time":"0.25800200 1235003390","fg_sort":2,"fg_hash":"4e5746e21919d087c69642898b5e46452ce�."P�-