https://github.com/envoy-vc/noir_hmac
https://github.com/envoy-vc/noir_hmac
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/envoy-vc/noir_hmac
- Owner: Envoy-VC
- License: mit
- Created: 2024-10-19T00:20:11.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-03T14:18:11.000Z (6 months ago)
- Last Synced: 2024-11-22T12:15:27.365Z (5 months ago)
- Language: Noir
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Noir HMAC
Noir HMAC is a implementation of the HMAC algorithm in Noir. It is a simple library that allows you to generate HMAC digests for a given message and secret key.
The Library provides the following methods:
- `hmac_sha256` - Generates a HMAC digest using the SHA-256 hashing algorithm.
## Installation
In your `Nargo.toml` file, add the version of this library you would like to install under dependency:
```toml
[dependencies]
noir_hmac = { tag = "v1.0.2", git = "https://github.com/Envoy-VC/noir_hmac" }
```## Usage
```noir
fn main() {
let key: BoundedVec = BoundedVec::from_array("secret_key".as_bytes());
let message: BoundedVec = BoundedVec::from_array("hello".as_bytes());
let res: [u8; 32] = hmac_sha256(key, message);
}
```