npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@zkpersona/noir-hmac

v0.1.0

Published

Hash-based Message Authentication Code (HMAC) implementation in Noir

Readme

Noir HMAC(Hash-based Message Authentication Code)

Noir implementation of HMAC(Hash-based Message Authentication Code). Currently, the following hash functions are supported:

  • SHA256

Note: SHA512 will be supported in the future as soon as library is reviewed. See noir-lang/sha512/pull/2

Noir version compatibility

This library is tested to work as of Noir version >=1.0.0.beta-2

Benchmarks

Benchmarks are ignored by git and checked on pull-request. As such, benchmarks may be generated with the following command.

./scripts/build-gates-report.sh

The benchmark will be generated at ./gates_report.json.

Installation

In your Nargo.toml file, add the version of this library you would like to install under dependency:

[dependencies]
noir_hmac = { tag = "v0.1.0", git = "https://github.com/zkpersona/noir-hmac", directory = "lib" }

Usage

HMAC-SHA256

use noir_hmac::hmac_sha256::hmac_sha256;

fn hmac_sha256_test() {
    let key: BoundedVec<u8, 10> = BoundedVec::from_array("secret_key".as_bytes());
    let message: BoundedVec<u8, 11> = BoundedVec::from_array("hello_world".as_bytes());
    let hmac: [u8; 32] = hmac_sha256(key, message);

    let expected: [u8; 32] = [
        32, 245, 74, 230, 153, 92, 121, 130, 198, 181, 233, 222, 161, 142, 167, 35, 8, 91, 220, 193,
        245, 93, 185, 150, 77, 51, 84, 8, 96, 219, 96, 75,
    ];

    assert(hmac == expected);
}