breez_sdk_liquid::bitcoin::util::key::secp256k1::hashes

Trait HashEngine

pub trait HashEngine: Clone + Default {
    type MidState;

    const BLOCK_SIZE: usize;

    // Required methods
    fn midstate(&self) -> Self::MidState;
    fn input(&mut self, data: &[u8]);
    fn n_bytes_hashed(&self) -> usize;
}
Expand description

A hashing engine which bytes can be serialized into.

Required Associated Constants§

const BLOCK_SIZE: usize

Length of the hash’s internal block size, in bytes.

Required Associated Types§

type MidState

Byte array representing the internal state of the hash engine.

Required Methods§

fn midstate(&self) -> Self::MidState

Outputs the midstate of the hash engine. This function should not be used directly unless you really know what you’re doing.

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

Add data to the hash engine.

fn n_bytes_hashed(&self) -> usize

Return the number of bytes already n_bytes_hashed(inputted).

Object Safety§

This trait is not object safe.

Implementors§

§

impl HashEngine for breez_sdk_liquid::bitcoin::util::key::secp256k1::hashes::ripemd160::HashEngine

§

const BLOCK_SIZE: usize = 64usize

§

type MidState = [u8; 20]

§

impl HashEngine for breez_sdk_liquid::bitcoin::util::key::secp256k1::hashes::sha1::HashEngine

§

const BLOCK_SIZE: usize = 64usize

§

type MidState = [u8; 20]

§

impl HashEngine for breez_sdk_liquid::bitcoin::util::key::secp256k1::hashes::sha256::HashEngine

§

const BLOCK_SIZE: usize = 64usize

§

type MidState = Midstate

§

impl HashEngine for breez_sdk_liquid::bitcoin::util::key::secp256k1::hashes::sha512::HashEngine

§

const BLOCK_SIZE: usize = 128usize

§

type MidState = [u8; 64]

§

impl HashEngine for breez_sdk_liquid::bitcoin::util::key::secp256k1::hashes::siphash24::HashEngine

§

const BLOCK_SIZE: usize = 8usize

§

type MidState = State

§

impl<T> HashEngine for HmacEngine<T>
where T: Hash,

§

const BLOCK_SIZE: usize = <T::Engine>::BLOCK_SIZE

§

type MidState = HmacMidState<T>