private static function strcmp($knownHash, $givenHash)
{
$result = 0;
// XOR the bytes of the 2 input hashes and loop over them.
// Each byte value is then added to a running total...
foreach (\str_split($knownHash ^ $givenHash) as $xbyte) {
$result += \ord($xbyte);
}
// Strings are equal if the final result is exactly zero
return 0 === $result;
}