[−][src]Trait bitcoin_hashes::Hash
Trait which applies to hashes of all types
Associated Types
type Engine: HashEngine
A hashing engine which bytes can be serialized into. It is expected
to implement the io::Write
trait, and to never return errors under
any conditions.
type Inner
The byte array that represents the hash internally
Associated Constants
const LEN: usize
Length of the hash, in bytes
const DISPLAY_BACKWARD: bool
Flag indicating whether user-visible serializations of this hash
should be backward. For some reason Satoshi decided this should be
true for Sha256dHash
, so here we are.
Required methods
fn engine() -> Self::Engine
Construct a new engine
fn from_engine(e: Self::Engine) -> Self
Produce a hash from the current state of a given engine
fn from_slice(sl: &[u8]) -> Result<Self, Error>
Copies a byte slice into a hash object
fn into_inner(self) -> Self::Inner
Unwraps the hash and returns the underlying byte array
Provided methods
Loading content...Implementors
impl Hash for bitcoin_hashes::hash160::Hash
[src]
type Engine = HashEngine
type Inner = [u8; 20]
ⓘImportant traits for HashEnginefn engine() -> HashEngine
[src]
ⓘImportant traits for HashEngine
fn from_engine(e: HashEngine) -> Hash
[src]
const LEN: usize
[src]
fn from_slice(sl: &[u8]) -> Result<Hash, Error>
[src]
fn into_inner(self) -> Self::Inner
[src]
fn hash(data: &[u8]) -> Self
[src]
const DISPLAY_BACKWARD: bool
[src]
impl Hash for bitcoin_hashes::ripemd160::Hash
[src]
type Engine = HashEngine
type Inner = [u8; 20]
ⓘImportant traits for HashEnginefn engine() -> HashEngine
[src]
ⓘImportant traits for HashEngine
fn from_engine(e: HashEngine) -> Hash
[src]
const LEN: usize
[src]
fn from_slice(sl: &[u8]) -> Result<Hash, Error>
[src]
fn into_inner(self) -> Self::Inner
[src]
fn hash(data: &[u8]) -> Self
[src]
const DISPLAY_BACKWARD: bool
[src]
impl Hash for bitcoin_hashes::sha1::Hash
[src]
type Engine = HashEngine
type Inner = [u8; 20]
ⓘImportant traits for HashEnginefn engine() -> HashEngine
[src]
ⓘImportant traits for HashEngine
fn from_engine(e: HashEngine) -> Hash
[src]
const LEN: usize
[src]
fn from_slice(sl: &[u8]) -> Result<Hash, Error>
[src]
fn into_inner(self) -> Self::Inner
[src]
fn hash(data: &[u8]) -> Self
[src]
const DISPLAY_BACKWARD: bool
[src]
impl Hash for bitcoin_hashes::sha256::Hash
[src]
type Engine = HashEngine
type Inner = [u8; 32]
ⓘImportant traits for HashEnginefn engine() -> HashEngine
[src]
ⓘImportant traits for HashEngine
fn from_engine(e: HashEngine) -> Hash
[src]
const LEN: usize
[src]
fn from_slice(sl: &[u8]) -> Result<Hash, Error>
[src]
fn into_inner(self) -> Self::Inner
[src]
fn hash(data: &[u8]) -> Self
[src]
const DISPLAY_BACKWARD: bool
[src]
impl Hash for bitcoin_hashes::sha256d::Hash
[src]
type Engine = HashEngine
type Inner = [u8; 32]
ⓘImportant traits for HashEnginefn engine() -> HashEngine
[src]
ⓘImportant traits for HashEngine
fn from_engine(e: HashEngine) -> Hash
[src]
const LEN: usize
[src]
fn from_slice(sl: &[u8]) -> Result<Hash, Error>
[src]
const DISPLAY_BACKWARD: bool
[src]
fn into_inner(self) -> Self::Inner
[src]
fn hash(data: &[u8]) -> Self
[src]
impl Hash for bitcoin_hashes::sha512::Hash
[src]
type Engine = HashEngine
type Inner = [u8; 64]
ⓘImportant traits for HashEnginefn engine() -> HashEngine
[src]
ⓘImportant traits for HashEngine
fn from_engine(e: HashEngine) -> Hash
[src]
const LEN: usize
[src]
fn from_slice(sl: &[u8]) -> Result<Hash, Error>
[src]
fn into_inner(self) -> Self::Inner
[src]
fn hash(data: &[u8]) -> Self
[src]
const DISPLAY_BACKWARD: bool
[src]
impl<T: Hash> Hash for Hmac<T>
[src]
type Engine = HmacEngine<T>
type Inner = T::Inner
ⓘImportant traits for HmacEngine<T>fn engine() -> HmacEngine<T>
[src]
ⓘImportant traits for HmacEngine<T>