#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

#61 in Cryptography

Download history 34858/week @ 2024-09-21 36921/week @ 2024-09-28 32917/week @ 2024-10-05 36260/week @ 2024-10-12 63928/week @ 2024-10-19 67852/week @ 2024-10-26 77126/week @ 2024-11-02 62077/week @ 2024-11-09 79439/week @ 2024-11-16 73155/week @ 2024-11-23 84645/week @ 2024-11-30 103040/week @ 2024-12-07 126236/week @ 2024-12-14 27266/week @ 2024-12-21 50831/week @ 2024-12-28 93565/week @ 2025-01-04

317,784 downloads per month
Used in 167 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

~110KB