/** * @license * Copyright 2026 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ /** * Hash algorithms supported by {@link createHmac}. Names follow the Node * `crypto` convention; WebCrypto-style names (e.g. `"SHA-256"`) are also * accepted and normalized. */ export type HmacHash = "sha1" | "sha256" | "sha384" | "sha512"; /** Output encoding for {@link createHmac}. `"bytes"` returns the raw {@link Uint8Array}. */ export type HmacEncoding = "hex" | "base64" | "base64url" | "bytes"; /** * Computes an HMAC over `data` using `key` and the given hash `algorithm`. * * @param algorithm - Hash to use, e.g. `"sha256"`. * @param key - Secret key, as a UTF-8 string or raw bytes. * @param data - Message to authenticate, as a UTF-8 string or raw bytes. * @param encoding - Output format. Defaults to `"hex"`. */ export declare function createHmac(algorithm: HmacHash, key: string | Uint8Array, data: string | Uint8Array, encoding?: "hex" | "base64" | "base64url"): Promise; export declare function createHmac(algorithm: HmacHash, key: string | Uint8Array, data: string | Uint8Array, encoding: "bytes"): Promise; //# sourceMappingURL=Hmac.d.ts.map