Struct bitcoins::prelude::Hash256 [−][src]
pub struct Hash256(_);
Expand description
A Digest
implementation that performs Bitcoin style double-sha256
Trait Implementations
type OutputSize = <Sha256 as FixedOutput>::OutputSize
type OutputSize = <Sha256 as FixedOutput>::OutputSize
Output size for fixed output digest
Write result into provided array and consume the hasher instance.
pub fn finalize_into_reset(
&mut self,
out: &mut GenericArray<u8, <Hash256 as FixedOutput>::OutputSize>
)
pub fn finalize_into_reset(
&mut self,
out: &mut GenericArray<u8, <Hash256 as FixedOutput>::OutputSize>
)
Write result into provided array and reset the hasher instance.
fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>
fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and consume the hasher instance.
fn finalize_fixed_reset(&mut self) -> GenericArray<u8, Self::OutputSize>
fn finalize_fixed_reset(&mut self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and reset the hasher instance.
Produce a marked digest from the hasher
Produce a marked digest from the hasher
Shortcut to produce a marked digest
Produce a marked digest from the hasher
Produce a marked digest from the hasher
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Write a buffer into this writer, returning how many bytes were written. Read more
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
Attempts to write an entire buffer into this writer. Read more
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more
Auto Trait Implementations
impl RefUnwindSafe for Hash256
impl UnwindSafe for Hash256
Blanket Implementations
Mutably borrows from an owned value. Read more
type OutputSize = <D as FixedOutput>::OutputSize
type OutputSize = <D as FixedOutput>::OutputSize
Output size for Digest
pub fn new() -> D
pub fn new() -> D
Create new hasher instance
pub fn finalize(self) -> GenericArray<u8, <D as Digest>::OutputSize>
pub fn finalize(self) -> GenericArray<u8, <D as Digest>::OutputSize>
Retrieve result and consume hasher instance.
pub fn finalize_reset(&mut self) -> GenericArray<u8, <D as Digest>::OutputSize>
pub fn finalize_reset(&mut self) -> GenericArray<u8, <D as Digest>::OutputSize>
Retrieve result and reset hasher instance. Read more
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset hasher instance to its initial state.
pub fn output_size() -> usize
pub fn output_size() -> usize
Get output size of the hasher
pub fn digest(data: &[u8]) -> GenericArray<u8, <D as Digest>::OutputSize>
pub fn digest(data: &[u8]) -> GenericArray<u8, <D as Digest>::OutputSize>
Convenience function to compute hash of the data
. It will handle
hasher creation, data feeding and finalization. Read more
impl<D> DynDigest for D where
D: 'static + Update + FixedOutput + Reset + Clone,
impl<D> DynDigest for D where
D: 'static + Update + FixedOutput + Reset + Clone,
Retrieve result and consume boxed hasher instance
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset hasher instance to its initial state.
pub fn output_size(&self) -> usize
pub fn output_size(&self) -> usize
Get output size of the hasher