#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

#63 in Cryptography

Download history 33973/week @ 2024-09-25 36454/week @ 2024-10-02 30609/week @ 2024-10-09 52808/week @ 2024-10-16 64165/week @ 2024-10-23 72486/week @ 2024-10-30 66351/week @ 2024-11-06 70484/week @ 2024-11-13 90348/week @ 2024-11-20 66810/week @ 2024-11-27 91618/week @ 2024-12-04 117760/week @ 2024-12-11 83639/week @ 2024-12-18 31130/week @ 2024-12-25 77827/week @ 2025-01-01 123506/week @ 2025-01-08

342,062 downloads per month
Used in 169 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