Struct Sha512

pub struct Sha512 {
    pub(crate) core: CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>,
    pub(crate) buffer: BlockBuffer<<CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> as BlockSizeUser>::BlockSize, <CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> as BufferKindUser>::BufferKind>,
}
Expand description

SHA-512 hasher.

Fields§

§core: CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>§buffer: BlockBuffer<<CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> as BlockSizeUser>::BlockSize, <CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> as BufferKindUser>::BufferKind>

Trait Implementations§

§

impl AlgorithmName for Sha512

§

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

Write algorithm name into f.
§

impl AssociatedOid for Sha512

§

const OID: ObjectIdentifier

The OID associated with this type.
§

impl BlockSizeUser for Sha512

§

type BlockSize = <CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> as BlockSizeUser>::BlockSize

Size of the block in bytes.
§

fn block_size() -> usize

Return block size in bytes.
§

impl Clone for Sha512

§

fn clone(&self) -> Sha512

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
§

impl CoreProxy for Sha512

§

type Core = CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>

Wrapped block-level type.
§

impl Debug for Sha512

§

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

Formats the value using the given formatter. Read more
§

impl Default for Sha512

§

fn default() -> Sha512

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

impl FixedOutput for Sha512

§

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

Consume value and write result into provided array.
§

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

Retrieve result and consume the hasher instance.
§

impl FixedOutputReset for Sha512

§

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

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

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

Retrieve result and reset the hasher state.
Source§

impl From<Sha512> for SignatureRequestInput

Source§

fn from(value: Sha512) -> Self

Converts to this type from the input type.
§

impl OutputSizeUser for Sha512

§

type OutputSize = <CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> as OutputSizeUser>::OutputSize

Size of the output in bytes.
§

fn output_size() -> usize

Return output size in bytes.
§

impl Reset for Sha512

§

fn reset(&mut self)

Reset state to its initial value.
§

impl SerializableState for Sha512

§

type SerializedStateSize = <<CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> as SerializableState>::SerializedStateSize as Add<<<CtOutWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> as BlockSizeUser>::BlockSize as Add<B1>>::Output>>::Output

Size of serialized internal state.
§

fn serialize( &self, ) -> Array<u8, <Sha512 as SerializableState>::SerializedStateSize>

Serialize and return internal state.
§

fn deserialize( serialized_state: &Array<u8, <Sha512 as SerializableState>::SerializedStateSize>, ) -> Result<Sha512, DeserializeStateError>

Create an object from serialized internal state.
Source§

impl TryFrom<SignatureRequestInput> for Sha512

Source§

type Error = Error

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

fn try_from(value: SignatureRequestInput) -> Result<Self, Self::Error>

Performs the conversion.
§

impl Update for Sha512

§

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

Update state using the provided data.
§

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

Digest input data in a chained manner.
§

impl HashMarker for Sha512

Auto Trait Implementations§

§

impl Freeze for Sha512

§

impl RefUnwindSafe for Sha512

§

impl Send for Sha512

§

impl Sync for Sha512

§

impl Unpin for Sha512

§

impl UnwindSafe for Sha512

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
§

impl<D> Digest for D
where D: FixedOutput + Default + Update + HashMarker,

§

fn new() -> D

Create new hasher instance.
§

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

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

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

Process data, updating the internal state.
§

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

Process input data in a chained manner.
§

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

Retrieve result and consume hasher instance.
§

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

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

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

Retrieve result and reset hasher instance.
§

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

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

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

Reset hasher instance to its initial state.
§

fn output_size() -> usize

Get output size of the hasher
§

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

Compute hash of data.
§

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

§

fn oid(&self) -> ObjectIdentifier

Get the OID associated with this value.
§

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

§

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

Digest input data. Read more
§

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

Retrieve result and reset hasher instance
§

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

Retrieve result and consume boxed hasher instance
§

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

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

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

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

fn reset(&mut self)

Reset hasher instance to its initial state.
§

fn output_size(&self) -> usize

Get output size of the hasher
§

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

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> DynDigestWithOid for T
where T: DynDigest + DynAssociatedOid,