pub struct Keccak {}Expand description
Struct which handles switching between available backends.
Implementations§
Source§impl Keccak
impl Keccak
Sourcepub fn with_backend(&self, f: impl BackendClosure)
pub fn with_backend(&self, f: impl BackendClosure)
Execute the provided backend closure with Keccak backend.
Sourcepub fn with_f1600(&self, f: impl FnOnce(Fn1600))
pub fn with_f1600(&self, f: impl FnOnce(Fn1600))
Execute the closure with f1600 function.
Sourcepub fn with_p200<const ROUNDS: usize>(&self, f: impl FnOnce(Fn200))
pub fn with_p200<const ROUNDS: usize>(&self, f: impl FnOnce(Fn200))
Execute the closure with p200 function with the specified number of rounds.
§Panics
If ROUNDS is bigger than F200_ROUNDS.
Sourcepub fn with_p400<const ROUNDS: usize>(&self, f: impl FnOnce(Fn400))
pub fn with_p400<const ROUNDS: usize>(&self, f: impl FnOnce(Fn400))
Execute the closure with p200 function with the specified number of rounds.
§Panics
If ROUNDS is bigger than F400_ROUNDS.
Sourcepub fn with_p800<const ROUNDS: usize>(&self, f: impl FnOnce(Fn800))
pub fn with_p800<const ROUNDS: usize>(&self, f: impl FnOnce(Fn800))
Execute the closure with p800 function with the specified number of rounds.
§Panics
If ROUNDS is bigger than F800_ROUNDS.
Sourcepub fn with_p1600<const ROUNDS: usize>(&self, f: impl FnOnce(Fn1600))
pub fn with_p1600<const ROUNDS: usize>(&self, f: impl FnOnce(Fn1600))
Execute the closure with p1600 function with the specified number of rounds.
§Panics
If ROUNDS is bigger than F1600_ROUNDS.
Trait Implementations§
impl Copy for Keccak
Auto Trait Implementations§
impl Freeze for Keccak
impl RefUnwindSafe for Keccak
impl Send for Keccak
impl Sync for Keccak
impl Unpin for Keccak
impl UnsafeUnpin for Keccak
impl UnwindSafe for Keccak
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
Mutably borrows from an owned value. Read more