Struct bdk_chain::bitcoin::hashes::sha512_256::HashEngine
pub struct HashEngine(/* private fields */);
Expand description
Engine to compute SHA512/256 hash function.
SHA512/256 is a hash function that uses the sha512 algorithm but it truncates the output to 256 bits. It has different initial constants than sha512 so it produces an entirely different hash compared to sha512. More information at https://eprint.iacr.org/2010/548.pdf.
Trait Implementations§
§impl Clone for HashEngine
impl Clone for HashEngine
§fn clone(&self) -> HashEngine
fn clone(&self) -> HashEngine
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Default for HashEngine
impl Default for HashEngine
§fn default() -> HashEngine
fn default() -> HashEngine
Returns the “default value” for a type. Read more
§impl HashEngine for HashEngine
impl HashEngine for HashEngine
§fn midstate(&self) -> [u8; 64]
fn midstate(&self) -> [u8; 64]
Outputs the midstate of the hash engine. This function should not be
used directly unless you really know what you’re doing.
§const BLOCK_SIZE: usize = 128usize
const BLOCK_SIZE: usize = 128usize
Length of the hash’s internal block size, in bytes.
§fn n_bytes_hashed(&self) -> usize
fn n_bytes_hashed(&self) -> usize
Return the number of bytes already n_bytes_hashed(inputted).
Auto Trait Implementations§
impl Freeze for HashEngine
impl RefUnwindSafe for HashEngine
impl Send for HashEngine
impl Sync for HashEngine
impl Unpin for HashEngine
impl UnwindSafe for HashEngine
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more