pub fn hash_equals(known: &[u8], user: &[u8]) -> bool
PHP hash_equals($known, $user): false at once when the lengths differ (PHP leaks the length too), otherwise a comparison whose time does not depend on where they differ.
hash_equals($known, $user)