verify_hash

Function verify_hash 

Source
pub fn verify_hash(
    expected_hash: u32,
    seed: ConnectionSecretSeed,
    payload: &[u8],
) -> Result<()>
Expand description

Verifies the integrity of a payload against an expected Murmur3 hash.

§Arguments

  • expected_hash - The expected Murmur3 hash value.
  • seed - The ConnectionSecretSeed used for generating the hash.
  • payload - The payload data to be hashed and compared.

§Errors

Returns an io::Result error if the calculated hash does not match the expected hash.