#sha-256 #sha-2 #hash #hash-ring #ethereum #hashing #switch

eth2_hashing

Hashing primitives used in Ethereum 2.0

2 unstable releases

0.2.0 Jul 29, 2021
0.1.0 Jul 31, 2019

#4 in #switches

Download history 425/week @ 2023-12-06 365/week @ 2023-12-13 173/week @ 2023-12-20 205/week @ 2023-12-27 484/week @ 2024-01-03 424/week @ 2024-01-10 497/week @ 2024-01-17 734/week @ 2024-01-24 720/week @ 2024-01-31 625/week @ 2024-02-07 644/week @ 2024-02-14 631/week @ 2024-02-21 571/week @ 2024-02-28 421/week @ 2024-03-06 541/week @ 2024-03-13 237/week @ 2024-03-20

1,850 downloads per month

Apache-2.0

9KB
175 lines

Optimized SHA256 for use in Ethereum 2.0.

The initial purpose of this crate was to provide an abstraction over the hash function used in Ethereum 2.0. The hash function changed during the specification process, so defining it once in this crate made it easy to replace.

Now this crate serves primarily as a wrapper over two SHA256 crates: sha2 and ring – which it switches between at runtime based on the availability of SHA intrinsics.

Dependencies

~7.5MB
~230K SLoC