BashHashCore

Struct BashHashCore 

Source
pub struct BashHashCore<OS: OutputSize> { /* private fields */ }
Expand description

Core bash-hash hasher generic over output size.

Specified in Section 7 of STB 34.101.77-2020.

Trait Implementations§

Source§

impl<OS: OutputSize> AlgorithmName for BashHashCore<OS>

Source§

fn write_alg_name(f: &mut Formatter<'_>) -> Result

Write algorithm name into f.
Source§

impl<OS: OutputSize> BlockSizeUser for BashHashCore<OS>

Source§

type BlockSize = <OS as OutputSize>::BlockSize

Size of the block in bytes.
Source§

fn block_size() -> usize

Return block size in bytes.
Source§

impl<OS: OutputSize> BufferKindUser for BashHashCore<OS>

Source§

type BufferKind = Eager

Block buffer kind over which type operates.
Source§

impl<OS: OutputSize> Clone for BashHashCore<OS>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<OS: OutputSize> Debug for BashHashCore<OS>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<OS: OutputSize> Default for BashHashCore<OS>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<OS: OutputSize> Drop for BashHashCore<OS>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<OS: OutputSize> FixedOutputCore for BashHashCore<OS>

Source§

fn finalize_fixed_core( &mut self, buffer: &mut Buffer<Self>, out: &mut Output<Self>, )

Finalize state using remaining data stored in the provided block buffer, write result into provided array and leave self in a dirty state.
Source§

impl<OS: OutputSize> OutputSizeUser for BashHashCore<OS>

Source§

type OutputSize = OS

Size of the output in bytes.
Source§

fn output_size() -> usize

Return output size in bytes.
Source§

impl<OS: OutputSize> Reset for BashHashCore<OS>

Source§

fn reset(&mut self)

Reset state to its initial value.
Source§

impl<OS: OutputSize> SerializableState for BashHashCore<OS>

Source§

type SerializedStateSize = UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>, B0>, B0>

Size of serialized internal state.
Source§

fn serialize(&self) -> SerializedState<Self>

Serialize and return internal state.
Source§

fn deserialize( serialized_state: &SerializedState<Self>, ) -> Result<Self, DeserializeStateError>

Create an object from serialized internal state.
Source§

impl<OS: OutputSize> UpdateCore for BashHashCore<OS>

Source§

fn update_blocks(&mut self, blocks: &[Block<Self>])

Update state using the provided data blocks.
Source§

impl<OS: OutputSize> HashMarker for BashHashCore<OS>

Source§

impl<OS: OutputSize> ZeroizeOnDrop for BashHashCore<OS>

Available on crate feature zeroize only.

Auto Trait Implementations§

§

impl<OS> Freeze for BashHashCore<OS>

§

impl<OS> RefUnwindSafe for BashHashCore<OS>
where OS: RefUnwindSafe,

§

impl<OS> Send for BashHashCore<OS>
where OS: Send,

§

impl<OS> Sync for BashHashCore<OS>
where OS: Sync,

§

impl<OS> Unpin for BashHashCore<OS>
where OS: Unpin,

§

impl<OS> UnwindSafe for BashHashCore<OS>
where OS: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.