export type HashName = "SHA-1" | "SHA-256"; /** UTF-8 bytes, backed by a plain `ArrayBuffer` (what Web Crypto takes). */ export declare const utf8: (text: string) => Uint8Array; export declare const concatBytes: (...parts: readonly Uint8Array[]) => Uint8Array; export declare const toHex: (bytes: Uint8Array) => string; export declare const toBase64: (bytes: Uint8Array) => string; /** Standard or URL-safe base64, padded or not. Throws on anything else. */ export declare const fromBase64: (value: string) => Uint8Array; /** HMAC of `data` under the UTF-8 bytes of `secret`. */ export declare const hmac: (hash: HashName, secret: string, data: Uint8Array) => Promise; export declare const digest: (hash: HashName, data: Uint8Array) => Promise; /** Compare two strings without leaking where they differ. */ export declare const timingSafeEqual: (a: string, b: string) => boolean; /** * A fast, stable 64-bit hash of `text` (two cyrb53-style lanes over its UTF-8 * bytes), as 16 hex digits. For idempotency keys, not for security: a * redelivery of the same text hashes the same. */ export declare const stableHash: (text: string) => string; //# sourceMappingURL=crypto.d.ts.map