lib/Blar/Hash/Hash.php
public static function compare($hash1, $hash2): bool {
        if(!is_string($hash1)) {
            $hash1 = (string) $hash1;
        }
        if(!is_string($hash2)) {
            $hash2 = (string) $hash2;
        }
        return hash_equals($hash1, $hash2);
    }
public static function compare($hash1, $hash2): bool {
        if(!is_string($hash1)) {
            $hash1 = (string) $hash1;
        }
        if(!is_string($hash2)) {
            $hash2 = (string) $hash2;
        }
        return hash_equals($hash1, $hash2);
    }
public static function compare ( $ hash1 , $ hash2 ) : bool { if ( ! is_string ( $ hash1 ) ) { $ hash1 = ( string ) $ hash1 ; } if ( ! is_string ( $ hash2 ) ) { $ hash2 = ( string ) $ hash2 ; } return hash_equals ( $ hash1 , $ hash2 ) ; }
Compare to hashes.
Minimize timing attacks.

@param string $hash1 Known hash
@param string $hash2 User hash

@return bool
Compare to hashes . Minimize timing attacks .