Expand description
Rust hashes library.
This is a simple, no-dependency library which implements the hash functions needed by Bitcoin. These are SHA256, SHA256d, and RIPEMD160. As an ancillary thing, it exposes hexadecimal serialization and deserialization, since these are needed to display hashes anway.
Modules§
- Useful comparison functions.
- Crate error type.
- HASH160 (SHA256 then RIPEMD160) implementation.
- Hex encoding and decoding.
- Hash-based Message Authentication Code (HMAC).
- RIPEMD160 implementation.
- Macros for serde trait implementations, and supporting code.
- SHA1 implementation.
- SHA256 implementation.
- SHA512 implementation.
- SHA256d implementation (double SHA256).
- SHA256t implementation (tagged SHA256).
- SipHash 2-4 implementation.
Macros§
- Adds slicing traits implementations to a given type
$ty
- Creates a new newtype around a
Hash
type. - Adds hexadecimal formatting implementation of a trait
$imp
to a given type$ty
. - Implements
Serialize
andDeserialize
for a type$t
which represents a newtype over a byte-slice over length$len
. - Macro used to define a newtype tagged hash. It creates two public types:
Structs§
- A hash computed from a RFC 2104 HMAC. Parameterized by the underlying hash function.
- Pair of underyling hash engines, used for the inner and outer hash of HMAC.
Enums§
- Crate error type.
Traits§
- Trait which applies to hashes of all types.
- A hashing engine which bytes can be serialized into.