Compare two hashes to check if they match
Timing-safe comparison prevents timing attacks by ensuring the comparison takes the same amount of time regardless of where differences occur. This is important when comparing secret values in security-critical applications.