#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

#78 in Cryptography

Download history 33473/week @ 2024-08-21 32522/week @ 2024-08-28 37589/week @ 2024-09-04 36160/week @ 2024-09-11 36637/week @ 2024-09-18 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 66829/week @ 2024-11-27 91529/week @ 2024-12-04

331,844 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

~105KB