/** One running `node:crypto` HMAC: each `update` feeds more of the message, `digest` ends it. */ type NodeHmac = { update(data: string | Uint8Array): NodeHmac; digest(): Uint8Array; }; /** The slice of `node:crypto` the SDK uses, when the runtime hands it out synchronously. */ export type NodeCrypto = { readonly createHmac: (algorithm: string, key: Uint8Array) => NodeHmac; readonly timingSafeEqual?: (left: Uint8Array, right: Uint8Array) => boolean; }; /** * `node:crypto`, through `process.getBuiltinModule` so no static import reaches a browser bundle. `null` * where it is missing or throws, which selects the TypeScript implementations below. Looked up on every * call rather than cached: the runtime caches the module, and a stale answer would outlive a test or * polyfill that swaps `process`. */ export declare const nodeCrypto: () => NodeCrypto | null; /** The SHA-256 digest of `message`, as 32 bytes. */ export declare const sha256: (message: Uint8Array) => Uint8Array; /** * The HMAC-SHA256 (RFC 2104) of the concatenation of `parts` under `key`, as 32 bytes. The parts are * streamed into the inner hash, so the signed content is never assembled into one buffer. */ export declare const hmacSha256Parts: (key: Uint8Array, parts: readonly Uint8Array[]) => Uint8Array; /** The HMAC-SHA256 (RFC 2104) of `message` under `key`, as 32 bytes. */ export declare const hmacSha256: (key: Uint8Array, message: Uint8Array) => Uint8Array; export {}; //# sourceMappingURL=hmac.d.ts.map