Struct xkcp_rs::KeccakHash
source · #[repr(align(8))]pub struct KeccakHash { /* private fields */ }
Expand description
Keccak hash function instance.
Implementations§
source§impl KeccakHash
impl KeccakHash
sourcepub fn new(
rate: u32,
capacity: u32,
hash_bit_length: u32,
suffix: u8
) -> Result<Self>
pub fn new( rate: u32, capacity: u32, hash_bit_length: u32, suffix: u8 ) -> Result<Self>
Initialize the Keccak[r, c]
sponge function instance used in sequential hashing mode.
sourcepub fn shake128() -> Self
pub fn shake128() -> Self
Initializes a SHAKE128 instance as specified in the FIPS 202 standard.
sourcepub fn shake256() -> Self
pub fn shake256() -> Self
Initializes a SHAKE256 instance as specified in the FIPS 202 standard.
sourcepub fn sha3_224() -> Self
pub fn sha3_224() -> Self
Initializes a SHA3-224 instance as specified in the FIPS 202 standard.
sourcepub fn sha3_256() -> Self
pub fn sha3_256() -> Self
Initializes a SHA3-256 instance as specified in the FIPS 202 standard.
sourcepub fn sha3_384() -> Self
pub fn sha3_384() -> Self
Initializes a SHA3-384 instance as specified in the FIPS 202 standard.
sourcepub fn sha3_512() -> Self
pub fn sha3_512() -> Self
Initializes a SHA3-512 instance as specified in the FIPS 202 standard.
Trait Implementations§
source§impl Clone for KeccakHash
impl Clone for KeccakHash
Auto Trait Implementations§
impl RefUnwindSafe for KeccakHash
impl Send for KeccakHash
impl Sync for KeccakHash
impl Unpin for KeccakHash
impl UnwindSafe for KeccakHash
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 224 bytes