Struct coins_core::hashes::Hash160
source · [−]pub struct Hash160(_);
Expand description
A Digest
implementation that performs Bitcoin style double-sha256
Trait Implementations
sourceimpl 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.
sourceimpl FixedOutput for Hash160
impl FixedOutput for Hash160
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 Hash160
impl FixedOutputReset for Hash160
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<Hash160Digest> for Hash160
impl MarkedDigest<Hash160Digest> for Hash160
sourcefn finalize_marked(self) -> Hash160Digest
fn finalize_marked(self) -> Hash160Digest
Produce a marked digest from the hasher
sourcefn digest_marked(data: &[u8]) -> Hash160Digest
fn digest_marked(data: &[u8]) -> Hash160Digest
Shortcut to produce a marked digest
sourceimpl 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.
sourceimpl Write for Hash160
impl Write for Hash160
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 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
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