Struct coins_core::hashes::Hash160
source · pub struct Hash160(_);
Expand description
A Digest
implementation that performs Bitcoin style double-sha256
Trait Implementations§
source§impl BlockSizeUser for Hash160
impl BlockSizeUser for Hash160
§type BlockSize = <CoreWrapper<Ripemd160Core> as BlockSizeUser>::BlockSize
type BlockSize = <CoreWrapper<Ripemd160Core> as BlockSizeUser>::BlockSize
Size of the block in bytes.
§fn block_size() -> usize
fn block_size() -> usize
Return block size in bytes.
source§impl FixedOutput for Hash160
impl FixedOutput for Hash160
source§fn 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.
source§fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>
fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>
Retrieve result and consume the hasher instance.
source§impl FixedOutputReset for Hash160
impl FixedOutputReset for Hash160
source§fn 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.
source§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 state.
source§impl MarkedDigest<Hash160Digest> for Hash160
impl MarkedDigest<Hash160Digest> for Hash160
source§fn finalize_marked(self) -> Hash160Digest
fn finalize_marked(self) -> Hash160Digest
Produce a marked digest from the hasher
source§fn digest_marked(data: &[u8]) -> Hash160Digest
fn digest_marked(data: &[u8]) -> Hash160Digest
Shortcut to produce a marked digest
source§impl OutputSizeUser for Hash160
impl OutputSizeUser for Hash160
§type OutputSize = <CoreWrapper<Ripemd160Core> as OutputSizeUser>::OutputSize
type OutputSize = <CoreWrapper<Ripemd160Core> as OutputSizeUser>::OutputSize
Size of the output in bytes.
§fn output_size() -> usize
fn output_size() -> usize
Return output size in bytes.
source§impl Write for Hash160
impl Write for Hash160
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn 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
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn 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
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
impl HashMarker for Hash160
Auto Trait Implementations§
impl RefUnwindSafe for Hash160
impl Send for Hash160
impl Sync for Hash160
impl Unpin for Hash160
impl UnwindSafe for Hash160
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
source§impl<D> Digest for Dwhere
D: FixedOutput + Default + Update + HashMarker,
impl<D> Digest for Dwhere D: FixedOutput + Default + Update + HashMarker,
source§fn new_with_prefix(data: impl AsRef<[u8]>) -> Dwhere
D: Default,
fn new_with_prefix(data: impl AsRef<[u8]>) -> Dwhere D: Default,
Create new hasher instance which has processed the provided data.
source§fn chain_update(self, data: impl AsRef<[u8]>) -> D
fn chain_update(self, data: impl AsRef<[u8]>) -> D
Process input data in a chained manner.
source§fn finalize(self) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>
fn finalize(self) -> GenericArray<u8, <D as OutputSizeUser>::OutputSize>
Retrieve result and consume hasher instance.
source§fn 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.
source§fn 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.
source§fn 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.
source§fn output_size() -> usize
fn output_size() -> usize
Get output size of the hasher
source§impl<D> DynDigest for Dwhere
D: Update + FixedOutputReset + Reset + Clone + 'static,
impl<D> DynDigest for Dwhere D: Update + FixedOutputReset + Reset + Clone + 'static,
source§fn finalize(self: Box<D, Global>) -> Box<[u8], Global>
fn finalize(self: Box<D, Global>) -> Box<[u8], Global>
Retrieve result and consume boxed hasher instance
source§fn 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
source§fn 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
source§fn output_size(&self) -> usize
fn output_size(&self) -> usize
Get output size of the hasher