#crypto #bitcoin #hash #digest

bitcoin_hashes

Hash functions used by rust-bitcoin which support rustc 1.29.0

21 releases

Uses old Rust 2015

new 0.9.6 May 4, 2021
0.9.4 Oct 25, 2020
0.7.6 Apr 5, 2020
0.7.4 Jan 14, 2020
0.1.0 Dec 8, 2018

#47 in Cryptocurrencies

Download history 8484/week @ 2021-01-16 8714/week @ 2021-01-23 8101/week @ 2021-01-30 7175/week @ 2021-02-06 11590/week @ 2021-02-13 7398/week @ 2021-02-20 7738/week @ 2021-02-27 7593/week @ 2021-03-06 7154/week @ 2021-03-13 6685/week @ 2021-03-20 7980/week @ 2021-03-27 6205/week @ 2021-04-03 6394/week @ 2021-04-10 6297/week @ 2021-04-17 7567/week @ 2021-04-24 8051/week @ 2021-05-01

31,499 downloads per month
Used in 153 crates (43 directly)

CC0 license

175KB
4K SLoC

Status

Bitcoin Hashes Library

This is a simple, no-dependency library which implements the hash functions needed by Bitcoin. These are SHA1, SHA256, SHA256d, SHA512, and RIPEMD160. As an ancilliary thing, it exposes hexadecimal serialization and deserialization, since these are needed to display hashes anway.

Documentation

Minimum Supported Rust Version (MSRV)

This library should always compile with any combination of features on Rust 1.29. However, due to some dependencies breaking their MSRV in patch releases, you may need to pin these deps explicitly, e.g. with the following commands

cargo generate-lockfile
cargo update -p serde_json --precise "1.0.39"

Contributions

Contributions are welcome, including additional hash function implementations.


lib.rs:

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.

Dependencies

~0–325KB