#sha-256 #hmac #hash #hkdf #sha-2 #size-optimization

no-std hmac-sha256

A small, self-contained SHA256 and HMAC-SHA256 implementation

18 releases (10 stable)

new 1.1.8 Dec 9, 2024
1.1.7 Jun 14, 2023
1.1.6 Nov 29, 2022
1.1.4 Jul 1, 2022
0.1.1 Apr 10, 2019

#173 in Cryptography

Download history 33908/week @ 2024-08-19 34069/week @ 2024-08-26 33912/week @ 2024-09-02 36960/week @ 2024-09-09 35442/week @ 2024-09-16 34762/week @ 2024-09-23 36981/week @ 2024-09-30 32167/week @ 2024-10-07 38593/week @ 2024-10-14 64757/week @ 2024-10-21 68818/week @ 2024-10-28 77122/week @ 2024-11-04 63097/week @ 2024-11-11 80277/week @ 2024-11-18 70195/week @ 2024-11-25 85371/week @ 2024-12-02

300,832 downloads per month
Used in 159 crates (48 directly)

ISC license

20KB
493 lines

rust-hmac-sha256

A small, self-contained SHA256, HMAC-SHA256, and HKDF-SHA256 implementation in Rust.

Optional features:

  • traits: enable support for the Digest trait from the digest crate.
  • opt_size: enable size optimizations. Based on benchmarks, the .text section size is reduced by 75%, at the cost of approximately 16% performance.

lib.rs:

A small, self-contained SHA256 and HMAC-SHA256 implementation (C) Frank Denis <fdenis [at] fastly [dot] com>, public domain

Dependencies

~110KB