Skip to main content

BashHash

Struct BashHash 

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

bash-hash hasher state generic over output size.

Trait Implementations§

Source§

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

Source§

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

Write algorithm name into f.
Source§

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

Source§

type BlockSize = <BashHashCore<OS> as BlockSizeUser>::BlockSize

Size of the block in bytes.
Source§

fn block_size() -> usize

Return block size in bytes.
Source§

impl<OS: OutputSize> Clone for BashHash<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> CoreProxy for BashHash<OS>

Source§

type Core = BashHashCore<OS>

Core block-level type.
Source§

fn compose(core: Self::Core, buffer: Buffer<Self::Core>) -> Self

Create Self from core and buffer.
Source§

fn decompose(self) -> (Self::Core, Buffer<Self::Core>)

Decompose self into core and buffer.
Source§

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

Source§

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

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

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

Source§

fn default() -> Self

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

impl<OS: OutputSize> FixedOutput for BashHash<OS>

Source§

fn finalize_into(self, out: &mut Output<Self>)

Consume value and write result into provided array.
Source§

fn finalize_fixed(self) -> Array<u8, Self::OutputSize>

Retrieve result and consume the hasher instance.
Source§

impl<OS: OutputSize> FixedOutputReset for BashHash<OS>

Source§

fn finalize_into_reset(&mut self, out: &mut Output<Self>)

Write result into provided array and reset the hasher state.
Source§

fn finalize_fixed_reset(&mut self) -> Array<u8, Self::OutputSize>

Retrieve result and reset the hasher state.
Source§

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

Source§

type OutputSize = <BashHashCore<OS> as OutputSizeUser>::OutputSize

Size of the output in bytes.
Source§

fn output_size() -> usize

Return output size in bytes.
Source§

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

Source§

fn reset(&mut self)

Reset state to its initial value.
Source§

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

Source§

type SerializedStateSize = <UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>, B0>, B0> as Add<<OS as OutputSize>::BlockSize>>::Output

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> Update for BashHash<OS>

Source§

fn update(&mut self, data: &[u8])

Update state using the provided data.
Source§

fn chain(self, data: impl AsRef<[u8]>) -> Self
where Self: Sized,

Digest input data in a chained manner.
Source§

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

Source§

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

Available on crate feature zeroize only.

Auto Trait Implementations§

§

impl<OS> Freeze for BashHash<OS>

§

impl<OS> RefUnwindSafe for BashHash<OS>

§

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

§

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

§

impl<OS> Unpin for BashHash<OS>
where OS: Unpin, <<OS as OutputSize>::BlockSize as ArraySize>::ArrayType<u8>: Unpin,

§

impl<OS> UnwindSafe for BashHash<OS>

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<D> Digest for D

Source§

fn new() -> D

Create new hasher instance.
Source§

fn new_with_prefix(data: impl AsRef<[u8]>) -> D
where D: Default,

Create new hasher instance which has processed the provided data.
Source§

fn update(&mut self, data: impl AsRef<[u8]>)

Process data, updating the internal state.
Source§

fn chain_update(self, data: impl AsRef<[u8]>) -> D

Process input data in a chained manner.
Source§

fn finalize(self) -> Array<u8, <D as OutputSizeUser>::OutputSize>

Retrieve result and consume hasher instance.
Source§

fn finalize_into(self, out: &mut Array<u8, <D as OutputSizeUser>::OutputSize>)

Write result into provided array and consume the hasher instance.
Source§

fn finalize_reset(&mut self) -> Array<u8, <D as OutputSizeUser>::OutputSize>

Retrieve result and reset hasher instance.
Source§

fn finalize_into_reset( &mut self, out: &mut Array<u8, <D as OutputSizeUser>::OutputSize>, )

Write result into provided array and reset the hasher instance.
Source§

fn reset(&mut self)
where D: Reset,

Reset hasher instance to its initial state.
Source§

fn output_size() -> usize

Get output size of the hasher
Source§

fn digest( data: impl AsRef<[u8]>, ) -> Array<u8, <D as OutputSizeUser>::OutputSize>

Compute hash of data.
Source§

impl<T> DynAssociatedOid for T
where T: AssociatedOid,

Source§

fn oid(&self) -> ObjectIdentifier

Get the OID associated with this value.
Source§

impl<D> DynDigest for D
where D: Update + FixedOutputReset + Reset + Clone + 'static,

Source§

fn update(&mut self, data: &[u8])

Digest input data. Read more
Source§

fn finalize_reset(&mut self) -> Box<[u8]>

Available on crate feature alloc only.
Retrieve result and reset hasher instance
Source§

fn finalize(self: Box<D>) -> Box<[u8]>

Available on crate feature alloc only.
Retrieve result and consume boxed hasher instance
Source§

fn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>

Write result into provided array and consume the hasher instance. Read more
Source§

fn finalize_into_reset( &mut self, buf: &mut [u8], ) -> Result<(), InvalidBufferSize>

Write result into provided array and reset the hasher instance. Read more
Source§

fn reset(&mut self)

Reset hasher instance to its initial state.
Source§

fn output_size(&self) -> usize

Get output size of the hasher
Source§

fn box_clone(&self) -> Box<dyn DynDigest>

Available on crate feature alloc only.
Clone hasher state into a boxed trait object
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.
Source§

impl<T> DynDigestWithOid for T