Type Alias Sha256

Source
pub type Sha256 = CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256>>;
Expand description

SHA-256 hasher.

Aliased Type§

pub struct Sha256 { /* private fields */ }

Trait Implementations§

Source§

impl DigestExt for Sha256

Source§

fn from_tag(tag: impl AsRef<[u8]>) -> Self

Initialize a diges with a given tag.
Source§

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

Digest raw byte slice.
Source§

fn finish(self) -> [u8; 32]

Compute the final cryptographic digest.
Source§

fn with_raw(self, data: &[u8]) -> Self
where Self: Sized,

Digest raw byte slice returning self.
Source§

fn with_len<const MAX: usize>(self, data: &[u8]) -> Self
where Self: Sized,

Digest bytes, adding the data length to the digest (preventing length extension attack). Read more
Source§

fn input_with_len<const MAX: usize>(&mut self, data: &[u8])

Digest bytes, adding the data length to the digest (preventing length extension attack).