crypto_hmac/lib.rs
1// SPDX-FileCopyrightText: Copyright © 2026 ReallyMe LLC. All rights reserved
2//
3// SPDX-License-Identifier: Apache-2.0
4
5//! HMAC (RFC 2104 / FIPS 198-1) over SHA-256, SHA-384, and SHA-512.
6//!
7//! The `native` and `wasm` lanes intentionally use the same audited RustCrypto
8//! implementation for byte-for-byte semantics.
9
10#![forbid(unsafe_code)]
11
12mod types;
13
14#[cfg(any(feature = "native", feature = "wasm"))]
15mod native;
16
17#[cfg(any(feature = "native", feature = "wasm"))]
18pub use native::{authenticate, verify};
19
20pub use types::{
21 HmacKey, HmacTag, HMAC_MAX_KEY_LENGTH, HMAC_SHA256_TAG_LENGTH, HMAC_SHA384_TAG_LENGTH,
22 HMAC_SHA512_TAG_LENGTH,
23};