Sha256

Struct Sha256 

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

SHA-256 hasher.

Fields§

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

Trait Implementations§

§

impl AlgorithmName for Sha256

§

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

Write algorithm name into f.
§

impl AssociatedOid for Sha256

§

const OID: ObjectIdentifier

The OID associated with this type.
§

impl BlockSizeUser for Sha256

§

type BlockSize = <CtOutWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, 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 Sha256

§

fn clone(&self) -> Sha256

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 Sha256

§

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

Core block-level type.
§

fn compose( core: <Sha256 as CoreProxy>::Core, buffer: BlockBuffer<<<Sha256 as CoreProxy>::Core as BlockSizeUser>::BlockSize, <<Sha256 as CoreProxy>::Core as BufferKindUser>::BufferKind>, ) -> Sha256

Create Self from core and buffer.
§

fn decompose( self, ) -> (<Sha256 as CoreProxy>::Core, BlockBuffer<<<Sha256 as CoreProxy>::Core as BlockSizeUser>::BlockSize, <<Sha256 as CoreProxy>::Core as BufferKindUser>::BufferKind>)

Decompose self into core and buffer.
§

impl Debug for Sha256

§

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

Formats the value using the given formatter. Read more
§

impl Default for Sha256

§

fn default() -> Sha256

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

impl FixedOutput for Sha256

§

fn finalize_into( self, out: &mut Array<u8, <Sha256 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 Sha256

§

fn finalize_into_reset( &mut self, out: &mut Array<u8, <Sha256 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.
§

impl OutputSizeUser for Sha256

§

type OutputSize = <CtOutWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, 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 Sha256

§

fn reset(&mut self)

Reset state to its initial value.
§

impl SerializableState for Sha256

§

type SerializedStateSize = <<CtOutWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>> as SerializableState>::SerializedStateSize as Add<<<CtOutWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>> as BlockSizeUser>::BlockSize as Add<<<CtOutWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>> as BufferKindUser>::BufferKind as Sealed>::Overhead>>::Output>>::Output

Size of serialized internal state.
§

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

Serialize and return internal state.
§

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

Create an object from serialized internal state.
§

impl Update for Sha256

§

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 Sha256

Auto Trait Implementations§

§

impl Freeze for Sha256

§

impl RefUnwindSafe for Sha256

§

impl Send for Sha256

§

impl Sync for Sha256

§

impl Unpin for Sha256

§

impl UnwindSafe for Sha256

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
§

impl<T> ArchivePointee for T

§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
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.
Source§

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

§

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
§

impl<T> EagerHash for T
where T: BlockSizeUser + Digest + CoreProxy, <T as CoreProxy>::Core: HashMarker + UpdateCore<BlockSize = <T as BlockSizeUser>::BlockSize> + FixedOutputCore<BufferKind = Eager> + BlockSizeUser + BufferKindUser + Default + Clone,

§

type Core = <T as CoreProxy>::Core

Block-level core type of the hash.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> LayoutRaw for T

§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Metadata = ()

The metadata type for pointers and references to this type.
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ServiceExt for T

§

fn decompression(self) -> Decompression<Self>
where Self: Sized,

Decompress response bodies. Read more
§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
§

fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>
where Self: Sized,

Catch panics and convert them into 500 Internal Server responses. Read more
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<T> Upcastable for T
where T: Any + Debug + 'static,

§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

§

impl<T> Upcastable for T
where T: Any + Send + Sync + 'static,

§

fn upcast_any_ref(&self) -> &(dyn Any + 'static)

upcast ref
§

fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)

upcast mut ref
§

fn upcast_any_box(self: Box<T>) -> Box<dyn Any>

upcast boxed dyn
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

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

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,