Skip to main content

is_buffer_equal_20

Function is_buffer_equal_20 

Source
pub fn is_buffer_equal_20(buf_1: &[u8], buf_2: &[u8]) -> bool
Expand description

Tests two 20-byte buffers for equality

This function efficiently compares two 20-byte buffers by reading them as little-endian integers. It’s optimized for performance and avoids byte-by-byte comparison.

§Arguments

  • buf_1 - The first 20-byte buffer to compare
  • buf_2 - The second 20-byte buffer to compare

§Returns

true if the buffers are equal, false otherwise