Struct Sha256VarCore
pub struct Sha256VarCore { /* private fields */ }Expand description
Core block-level SHA-256 hasher with variable output size.
Supports initialization only for 28 and 32 byte output sizes, i.e. 224 and 256 bits respectively.
Trait Implementations§
§impl AlgorithmName for Sha256VarCore
impl AlgorithmName for Sha256VarCore
§impl BlockSizeUser for Sha256VarCore
impl BlockSizeUser for Sha256VarCore
§impl BufferKindUser for Sha256VarCore
impl BufferKindUser for Sha256VarCore
§type BufferKind = Eager
type BufferKind = Eager
Block buffer kind over which type operates.
§impl Clone for Sha256VarCore
impl Clone for Sha256VarCore
§fn clone(&self) -> Sha256VarCore
fn clone(&self) -> Sha256VarCore
Returns a duplicate 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 more§impl Debug for Sha256VarCore
impl Debug for Sha256VarCore
§impl OutputSizeUser for Sha256VarCore
impl OutputSizeUser for Sha256VarCore
§impl UpdateCore for Sha256VarCore
impl UpdateCore for Sha256VarCore
§fn update_blocks(
&mut self,
blocks: &[GenericArray<u8, <Sha256VarCore as BlockSizeUser>::BlockSize>],
)
fn update_blocks( &mut self, blocks: &[GenericArray<u8, <Sha256VarCore as BlockSizeUser>::BlockSize>], )
Update state using the provided data blocks.
§impl VariableOutputCore for Sha256VarCore
impl VariableOutputCore for Sha256VarCore
§const TRUNC_SIDE: TruncSide = TruncSide::Left
const TRUNC_SIDE: TruncSide = TruncSide::Left
Side which should be used in a truncated result.
§fn new(output_size: usize) -> Result<Sha256VarCore, InvalidOutputSize>
fn new(output_size: usize) -> Result<Sha256VarCore, InvalidOutputSize>
Initialize hasher state for given output size. Read more
§fn finalize_variable_core(
&mut self,
buffer: &mut BlockBuffer<<Sha256VarCore as BlockSizeUser>::BlockSize, <Sha256VarCore as BufferKindUser>::BufferKind>,
out: &mut GenericArray<u8, <Sha256VarCore as OutputSizeUser>::OutputSize>,
)
fn finalize_variable_core( &mut self, buffer: &mut BlockBuffer<<Sha256VarCore as BlockSizeUser>::BlockSize, <Sha256VarCore as BufferKindUser>::BufferKind>, out: &mut GenericArray<u8, <Sha256VarCore as OutputSizeUser>::OutputSize>, )
Finalize hasher and write full hashing result into the
out buffer. Read moreimpl HashMarker for Sha256VarCore
Auto Trait Implementations§
impl Freeze for Sha256VarCore
impl RefUnwindSafe for Sha256VarCore
impl Send for Sha256VarCore
impl Sync for Sha256VarCore
impl Unpin for Sha256VarCore
impl UnwindSafe for Sha256VarCore
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 more