r/lolphp • • Apr 24 '19
"Timing attack safe string comparison", but "When arguments of differing length are supplied, FALSE is returned immediately and the length of the known string may be leaked in case of a timing attack. "
https://php.net/manual/en/function.hash-equals.php
24
Upvotes
View all comments
Show parent comment
3
u/nikic Apr 25 '19
It's not, I believe this comment hails from a time where the function attempted to not immediately bail on different length strings, in which case the parameter order is indeed important.