Module shake128
Available on crate feature
dep_orion
only.Expand description
SHAKE-128 XOF as specified in the FIPS PUB 202.
§Parameters:
data
: The data to be hashed.
§Errors:
An error will be returned if:
§Security:
- 128-bit security against all attacks requires a minimum of 256 bits output (32 bytes).
§Example:
use orion::hazardous::hash::sha3::shake128::Shake128;
// Using the streaming interface
let mut state = Shake128::new();
state.absorb(b"Hello world")?;
let mut dest = [0u8; 32];
state.squeeze(&mut dest[..16])?;
state.squeeze(&mut dest[16..])?;
Structs§
- Shake128
- SHAKE-128 streaming state.
Constants§
- SHAKE_
128_ RATE - Rate of SHAKE-128.