Signature
- Namespace
- Class
Parameters
- a - First CallData instance
- b - Second CallData instance
Returns
boolean - true if instances are bytewise identical, false otherwise
Examples
- Basic Usage
- Class API
- Deduplication
- Cache Key
Constant-Time Comparison
Uses constant-time comparison to prevent timing attacks:- Prevents timing side-channel attacks
- Attacker can’t learn where bytes differ
- Standard practice for cryptographic comparisons
Use Cases
Transaction Matching
Replay Detection
Cache Management
Unit Testing
Performance
Constant-time comparison is fast:Comparison Methods
- equals() - Bytewise
- Hex Comparison
- Reference Equality
- Constant-time (secure)
- No allocation
- Fast
- Direct comparison
- Security-sensitive code
- Performance-critical paths
Edge Cases
- Different Lengths
- Empty vs Non-Empty
false (fast path).Type Safety
Requires CallData instances (not plain Uint8Array):Related
- hasSelector - Compare selectors only
- is - Type guard check
- toHex - Convert for string comparison
- toBytes - Access raw bytes

