function computeHmacSha256
computeHmacSha256(
data: Uint8Array,
secret: string,
): Promise<ArrayBuffer>

Compute HMAC-SHA256 using Web Crypto API, returning raw ArrayBuffer. The keyed digest lives in #shared/sha256.ts, the one HMAC both sides of a digest comparison run.

Parameters

secret: string

Return Type

Promise<ArrayBuffer>

Usage

import { computeHmacSha256 } from "doc.ts";