Skip to main content

DefaultHasher

Type Alias DefaultHasher 

Source
pub type DefaultHasher = BuildHasherDefault<FxHasher>;
Expand description

Default hasher for non-cryptographic HashMaps/HashSets in BEAM.

Uses FxHash — the same hasher used by the Rust compiler itself. FxHash is ~3-4× faster than SipHash (std default) but is NOT HashDoS-resistant. This is acceptable for BEAM’s P2P relay context where peers are semi-trusted (must connect via WebSocket first).

For cryptographic contexts (e.g. sea::session), use std’s default HashMap with RandomState (SipHash) instead.

Aliased Type§

pub struct DefaultHasher(/* private fields */);