|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-09-20 12:11 UTC] grundik at ololo dot cc
Description:
------------
If input data contains long sequence of 0xFF bytes (40+ bytes), then calculated hash using gost-crypto algorithm becomes incorrect. That affects at least these functions:
* hash;
* hash_file;
* hash_stream.
Test script:
---------------
$test = str_repeat("\xFF", 40);
echo hash('gost-crypto', $test);
Expected result:
----------------
231d8bb980d3faa30fee6ec475df5669cf6c24bbce22f46d6737470043a99f8e
Actual result:
--------------
8e0be2995864c40f8111feaa9df6fc4830632fdf61e365d9feca87f1e485d1f7
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Same issue in gost hash: Test script: --------------- $test = str_repeat("\xFF", 40); echo hash('gost', $test); Expected result: ---------------- 9eaf96ba62f90fae6707f1d4274d1a9d6680f5a121d4387815aa3a6ec42439c5 Actual result: -------------- 140da043c3c8c9355b73de375ba23ce82cd0aa7c2ba334a25b7058fbe3efaba2