rok::core::crypto::sha3
SHA-3 (FIPS 202): SHA3-256, SHA3-512 and the SHAKE128 / SHAKE256 extendable-output functions, all over Keccak-f[1600].
Structs
Sha3_256
pub struct Sha3_256SHA3-256: 32-byte digests.
pub const OUTPUT_LEN: usize = 32pub const fn new() -> Sha3_256pub fn digest(data: Bytes) -> List<u8>pub fn update(ref self, data: Bytes)pub const fn finish(self) -> List<u8>
Sha3_512
pub struct Sha3_512SHA3-512: 64-byte digests.
pub const OUTPUT_LEN: usize = 64pub const fn new() -> Sha3_512pub fn digest(data: Bytes) -> List<u8>pub fn update(ref self, data: Bytes)pub const fn finish(self) -> List<u8>
Shake128
pub struct Shake128SHAKE128: update the input, then squeeze output in any pieces.
update after the first squeeze is not allowed.
pub const fn new() -> Shake128pub fn update(ref self, data: Bytes)pub const fn squeeze(ref self, n: usize) -> List<u8>
Shake256
pub struct Shake256SHAKE256, like Shake128.
pub const fn new() -> Shake256pub fn update(ref self, data: Bytes)pub const fn squeeze(ref self, n: usize) -> List<u8>