Module hashes

Source
Expand description

Holds utilites for working with cryptographic digests, and disambiguating digests via marker traits.

We want to wrap hashes in marked newtypes in order to prevent type-confusion between TXIDs, sighashes, and other digests with the same length.

Structs§

GenericArray
Struct representing a generic array - GenericArray<T, N> works like [T; N]
Hash160
A Digest implementation that performs Bitcoin style double-sha256
Hash256
A Digest implementation that performs Bitcoin style double-sha256
Hash160Digest
A bitcoin-style Hash160
Hash256Digest
A bitcoin-style Hash256

Traits§

Digest
Convenience wrapper trait covering functionality of cryptographic hash functions with fixed output size.
MarkedDigest
A marked digest
MarkedDigestOutput
Convenience interface for hash function outputs, particularly marked digest outputs

Type Aliases§

DigestOutput
Output of a Digest function
Ripemd160
RIPEMD-160 hasher.
Sha3_256
SHA-3-256 hasher state.
Sha256
SHA-256 hasher.