Module coins_core::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

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

Traits

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

Type Definitions