Skip to main content

is_buffer_equal_32

Function is_buffer_equal_32 

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

Tests two 32-byte buffers for equality

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

§Arguments

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

§Returns

true if the buffers are equal, false otherwise