#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)

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

#60 in Cryptography

Download history 35457/week @ 2024-09-17 34516/week @ 2024-09-24 37092/week @ 2024-10-01 30917/week @ 2024-10-08 46056/week @ 2024-10-15 62963/week @ 2024-10-22 71513/week @ 2024-10-29 70229/week @ 2024-11-05 66951/week @ 2024-11-12 84400/week @ 2024-11-19 70317/week @ 2024-11-26 89198/week @ 2024-12-03 111633/week @ 2024-12-10 105121/week @ 2024-12-17 31985/week @ 2024-12-24 45141/week @ 2024-12-31

309,237 downloads per month
Used in 166 crates (50 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

~105KB