Trait bitcoin_hashes::HashEngine[][src]

pub trait HashEngine: Clone + Default {
    type MidState;

    const BLOCK_SIZE: usize;

    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

Associated Types

Byte array representing the internal state of the hash engine

Associated Constants

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

Required methods

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

Add data to the hash engine

Return the number of bytes already n_bytes_hashed(inputted)

Implementors