Skip to main content

GlobalState

Type Alias GlobalState 

Source
pub type GlobalState = GlobalState<AVALANCHE, SPONGE, COMPACT, PROTECTED>;
Expand description

A [std::hash::BuildHasher] that uses a global seed and secrets, randomized only once on startup.

All instances of GlobalState will use the same global seed and secrets for the lifetime of the program. This provides minimal HashDoS resistance by randomizing the seed and secrets between application runs.

This initializes a RapidHasher with the following settings:

  • AVALANCHE is disabled.
  • SPONGE is enabled.
  • COMPACT is disabled.
  • PROTECTED is disabled.

Use crate::quality::GlobalState for a higher quality but slower hash output where desirable.

Aliased Typeยง

pub struct GlobalState { /* private fields */ }