Skip to main content

keyed_hash

Function keyed_hash 

Source
fn keyed_hash(key: &[u8; 16], token: &ReplayToken) -> u64
Expand description

Keyed hash over token, used to pick a shard.

SipHasher13 with an explicit key, not std::hash::DefaultHasher: the latter’s keys are fixed, so a sender who computes the tag could predict the shard exactly as well as with no hash at all.