pub struct ParallelHash { /* private fields */ }
Expand description
The ParallelHash
hash functions defined in SP800-185
.
The purpose of ParallelHash
is to support the efficient hashing of very long strings, by
taking advantage of the parallelism available in modern processors. ParallelHash
supports the
128-bit
and 256-bit
security strengths, and also provides variable-length output.
§Usage
[dependencies]
tiny-keccak = { version = "2.0.0", features = ["parallel_hash"] }
Implementations§
Source§impl ParallelHash
impl ParallelHash
Sourcepub fn v128(custom_string: &[u8], block_size: usize) -> ParallelHash
pub fn v128(custom_string: &[u8], block_size: usize) -> ParallelHash
Creates new ParallelHash
hasher with a security level of 128 bits.
Sourcepub fn v256(custom_string: &[u8], block_size: usize) -> ParallelHash
pub fn v256(custom_string: &[u8], block_size: usize) -> ParallelHash
Creates new ParallelHash
hasher with a security level of 256 bits.
Trait Implementations§
Source§impl Clone for ParallelHash
impl Clone for ParallelHash
Source§fn clone(&self) -> ParallelHash
fn clone(&self) -> ParallelHash
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Hasher for ParallelHash
impl Hasher for ParallelHash
Auto Trait Implementations§
impl Freeze for ParallelHash
impl RefUnwindSafe for ParallelHash
impl Send for ParallelHash
impl Sync for ParallelHash
impl Unpin for ParallelHash
impl UnwindSafe for ParallelHash
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)