Function xchks32

Function Documentation

uint32_t xchks32(const uint32_t *buf, size_t n_bytes, uint32_t seed)

Compute an 32-bit checksum (XOR, rotate)

Both buf and n_bytes must be 32-bit aligned, or no action is performed.

Parameters:
  • buf – Buffer to compute over

  • n_bytes – # bytes in buffer

  • seed – Starting value for checksum

Returns:

Computed 32-bit checksum