Struct coins_core::hashes::Hash256
source · [−]pub struct Hash256(_);
Expand description
A Digest
implementation that performs Bitcoin style double-sha256
Trait Implementations
sourceimpl BlockSizeUser for Hash256
impl BlockSizeUser for Hash256
type BlockSize = <CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> as BlockSizeUser>::BlockSize
type BlockSize = <CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> as BlockSizeUser>::BlockSize
Size of the block in bytes.
fn block_size() -> usize
fn block_size() -> usize
Return block size in bytes.
sourceimpl FixedOutput for Hash256
impl FixedOutput for Hash256
sourcefn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>)
fn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>)
Consume value and write result into provided array.
sourcefn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>
fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and consume the hasher instance.
sourceimpl FixedOutputReset for Hash256
impl FixedOutputReset for Hash256
sourcefn finalize_into_reset(&mut self, out: &mut Output<Self>)
fn finalize_into_reset(&mut self, out: &mut Output<Self>)
Write result into provided array and reset the hasher state.
sourcefn 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 state.
sourceimpl MarkedDigest<Hash256Digest> for Hash256
impl MarkedDigest<Hash256Digest> for Hash256
sourcefn finalize_marked(self) -> Hash256Digest
fn finalize_marked(self) -> Hash256Digest
Produce a marked digest from the hasher
sourcefn digest_marked(data: &[u8]) -> Hash256Digest
fn digest_marked(data: &[u8]) -> Hash256Digest
Shortcut to produce a marked digest
sourceimpl OutputSizeUser for Hash256
impl OutputSizeUser for Hash256
type OutputSize = <CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> as OutputSizeUser>::OutputSize
type OutputSize = <CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>> as OutputSizeUser>::OutputSize
Size of the output in bytes.
fn output_size() -> usize
fn output_size() -> usize
Return output size in bytes.
sourceimpl Write for Hash256
impl Write for Hash256
sourcefn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
1.0.0 · sourcefn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
sourcefn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
impl HashMarker for Hash256
Auto Trait Implementations
impl RefUnwindSafe for Hash256
impl Send for Hash256
impl Sync for Hash256
impl Unpin for Hash256
impl UnwindSafe for Hash256
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<D> Digest for D where
D: FixedOutput + Default + Update + HashMarker,
impl<D> Digest for D where
D: FixedOutput + Default + Update + HashMarker,
sourcefn new_with_prefix(data: impl AsRef<[u8]>) -> D where
D: Default,
fn new_with_prefix(data: impl AsRef<[u8]>) -> D where
D: Default,
Create new hasher instance which has processed the provided data.
sourcefn chain_update(self, data: impl AsRef<[u8]>) -> D
fn chain_update(self, data: impl AsRef<[u8]>) -> D
Process input data in a chained manner.
sourcefn finalize(self) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>
fn finalize(self) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>
Retrieve result and consume hasher instance.
sourcefn finalize_into(
self,
out: &mut GenericArray<u8, <D as OutputSizeUser>::OutputSize>
)
fn finalize_into(
self,
out: &mut GenericArray<u8, <D as OutputSizeUser>::OutputSize>
)
Write result into provided array and consume the hasher instance.
sourcefn finalize_reset(
&mut self
) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize> where
D: FixedOutputReset,
fn finalize_reset(
&mut self
) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize> where
D: FixedOutputReset,
Retrieve result and reset hasher instance.
sourcefn finalize_into_reset(
&mut self,
out: &mut GenericArray<u8, <D as OutputSizeUser>::OutputSize>
) where
D: FixedOutputReset,
fn finalize_into_reset(
&mut self,
out: &mut GenericArray<u8, <D as OutputSizeUser>::OutputSize>
) where
D: FixedOutputReset,
Write result into provided array and reset the hasher instance.
sourcefn output_size() -> usize
fn output_size() -> usize
Get output size of the hasher
sourceimpl<D> DynDigest for D where
D: 'static + Update + FixedOutputReset + Reset + Clone,
impl<D> DynDigest for D where
D: 'static + Update + FixedOutputReset + Reset + Clone,
sourcefn finalize_reset(&mut self) -> Box<[u8], Global>
fn finalize_reset(&mut self) -> Box<[u8], Global>
Retrieve result and reset hasher instance
sourcefn finalize(self: Box<D, Global>) -> Box<[u8], Global>
fn finalize(self: Box<D, Global>) -> Box<[u8], Global>
Retrieve result and consume boxed hasher instance
sourcefn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>
fn finalize_into(self, buf: &mut [u8]) -> Result<(), InvalidBufferSize>
Write result into provided array and consume the hasher instance. Read more
sourcefn finalize_into_reset(
&mut self,
buf: &mut [u8]
) -> Result<(), InvalidBufferSize>
fn finalize_into_reset(
&mut self,
buf: &mut [u8]
) -> Result<(), InvalidBufferSize>
Write result into provided array and reset the hasher instance. Read more
sourcefn output_size(&self) -> usize
fn output_size(&self) -> usize
Get output size of the hasher