Module shake256

Available on crate feature dep_orion only.
Expand description

SHAKE-256 XOF as specified in the FIPS PUB 202.

§Parameters:

  • data: The data to be hashed.

§Errors:

An error will be returned if:

§Security:

  • 256-bit security against all attacks requires a minimum of 512 bits output (64 bytes).

§Example:

use orion::hazardous::hash::sha3::shake256::Shake256;

// Using the streaming interface
let mut state = Shake256::new();
state.absorb(b"Hello world")?;

let mut dest = [0u8; 64];
state.squeeze(&mut dest[..32])?;
state.squeeze(&mut dest[32..])?;

Structs§

Shake256
SHAKE-256 streaming state.

Constants§

SHAKE_256_RATE
Rate of SHAKE-256.