pub struct ParallelHash256 { /* private fields */ }Expand description
ParallelHash256 configured with a block size and customization string.
A small convenience wrapper over parallel_hash256 /
parallel_hash256_xof.
Implementations§
Source§impl ParallelHash256
impl ParallelHash256
Sourcepub fn new(block_size: usize, customization: &[u8]) -> Result<Self, CryptoError>
pub fn new(block_size: usize, customization: &[u8]) -> Result<Self, CryptoError>
Create a ParallelHash256 with the given block_size (bytes) and
customization string S.
§Errors
Returns CryptoError::BadInput if block_size is 0.
Sourcepub fn hash(&self, data: &[u8], out: &mut [u8]) -> Result<(), CryptoError>
pub fn hash(&self, data: &[u8], out: &mut [u8]) -> Result<(), CryptoError>
Hash data with fixed output length out.len() bytes.
§Errors
Propagates errors from parallel_hash256.
Sourcepub fn hash_xof(&self, data: &[u8], out: &mut [u8]) -> Result<(), CryptoError>
pub fn hash_xof(&self, data: &[u8], out: &mut [u8]) -> Result<(), CryptoError>
Hash data in XOF mode, producing out.len() bytes.
§Errors
Propagates errors from parallel_hash256_xof.
Trait Implementations§
Source§impl Clone for ParallelHash256
impl Clone for ParallelHash256
Source§fn clone(&self) -> ParallelHash256
fn clone(&self) -> ParallelHash256
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParallelHash256
impl RefUnwindSafe for ParallelHash256
impl Send for ParallelHash256
impl Sync for ParallelHash256
impl Unpin for ParallelHash256
impl UnsafeUnpin for ParallelHash256
impl UnwindSafe for ParallelHash256
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