Skip to main content

hash_equals

Function hash_equals 

Source
pub fn hash_equals(known: &[u8], user: &[u8]) -> bool
Expand description

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.