pub struct ParallelHash256 { /* private fields */ }Expand description
ParallelHash256 implementation
Implementations§
Source§impl ParallelHash256
impl ParallelHash256
Sourcepub fn new(custom: &[u8], blocksize: usize) -> Self
pub fn new(custom: &[u8], blocksize: usize) -> Self
Creates a new ParallelHash instance with the given customization string and block size
Sourcepub fn finalize(self, output: &mut [u8]) -> Option<()>
pub fn finalize(self, output: &mut [u8]) -> Option<()>
Finalize with specified output length.
output.len() must not exceed MAX_SP800185_FIXED_OUTPUT_BYTES. For longer
output, use Self::xof.
Returns None if output.len() is greater than
MAX_SP800185_FIXED_OUTPUT_BYTES.
Sourcepub fn finalize_with_length(self, output_len: usize) -> Option<Vec<u8>>
pub fn finalize_with_length(self, output_len: usize) -> Option<Vec<u8>>
Finalize with specified output length and return as Vec.
Returns None if output_len is greater than MAX_SP800185_FIXED_OUTPUT_BYTES.
For longer output, use Self::xof.
Sourcepub fn xof(self) -> ParallelHash256Reader
pub fn xof(self) -> ParallelHash256Reader
Returns an XOF reader for variable-length output.
SP 800-185 encodes XOF mode with right_encode(0) (output bit length zero) before
squeezing.
This consumes self and finalizes the sponge; you cannot call Self::update
afterward on this value.
Trait Implementations§
Source§impl AlgorithmName for ParallelHash256
impl AlgorithmName for ParallelHash256
Source§impl BlockSizeUser for ParallelHash256
impl BlockSizeUser for ParallelHash256
Source§impl BufferKindUser for ParallelHash256
impl BufferKindUser for ParallelHash256
Source§type BufferKind = Eager
type BufferKind = Eager
Block buffer kind over which type operates.
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 moreSource§impl Debug for ParallelHash256
impl Debug for ParallelHash256
Source§impl Default for ParallelHash256
impl Default for ParallelHash256
impl HashMarker for ParallelHash256
Source§impl SerializableState for ParallelHash256
impl SerializableState for ParallelHash256
Source§type SerializedStateSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B1>, B0>, B0>, B0>, B0>
type SerializedStateSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B1>, B0>, B0>, B0>, B0>
Size of serialized internal state.
Source§fn serialize(&self) -> SerializedState<Self>
fn serialize(&self) -> SerializedState<Self>
Serialize and return internal state.
Source§fn deserialize(
serialized_state: &SerializedState<Self>,
) -> Result<Self, DeserializeStateError>
fn deserialize( serialized_state: &SerializedState<Self>, ) -> Result<Self, DeserializeStateError>
Create an object from serialized internal state. Read more
Source§impl Update for ParallelHash256
impl Update for ParallelHash256
Source§impl UpdateCore for ParallelHash256
impl UpdateCore for ParallelHash256
Source§fn update_blocks(&mut self, blocks: &[Block<Self>])
fn update_blocks(&mut self, blocks: &[Block<Self>])
Update state using the provided data blocks.
impl ZeroizeOnDrop for ParallelHash256
Available on crate feature
zeroize only.Auto 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SmallBlockSizeUser for T
impl<T> SmallBlockSizeUser for T
Source§type _BlockSize = <T as BlockSizeUser>::BlockSize
type _BlockSize = <T as BlockSizeUser>::BlockSize
Helper associated type equal to
<Self as BlockSizeUser>::BlockSize.