/** Hex string to Uint8Array. Accepts lowercase/uppercase, optional 0x prefix. Throws RangeError on odd-length or non-hex input. */ export declare const hexToBytes: (hex: string) => Uint8Array; /** Uint8Array to lowercase hex string. */ export declare const bytesToHex: (bytes: Uint8Array) => string; /** UTF-8 string to Uint8Array. */ export declare const utf8ToBytes: (str: string) => Uint8Array; /** Uint8Array to UTF-8 string. */ export declare const bytesToUtf8: (bytes: Uint8Array) => string; /** Base64 or base64url string to Uint8Array. Handles padded, unpadded, and legacy %3d padding. Throws RangeError on invalid input. */ export declare const base64ToBytes: (b64: string) => Uint8Array; /** Uint8Array to base64 string. Pass url=true for base64url (RFC 4648 ยง5, no padding characters). */ export declare const bytesToBase64: (bytes: Uint8Array, url?: boolean) => string; export declare const CTE_MAX_BYTES = 32768; /** * Constant-time byte-array equality. * Runs entirely inside a WASM SIMD module (v128 XOR accumulate with * branch-free reduction). Throws on runtimes without SIMD support, * no JS fallback. Length check is not constant-time (length is * non-secret in all protocols). Max input size: 32768 bytes per side. */ export declare const constantTimeEqual: (a: Uint8Array, b: Uint8Array) => boolean; /** Zero a typed array in place. */ export declare const wipe: (data: Uint8Array | Uint16Array | Uint32Array) => void; /** XOR two equal-length Uint8Arrays, returns new array. */ export declare const xor: (a: Uint8Array, b: Uint8Array) => Uint8Array; /** Concatenate one or more Uint8Arrays into a new array. */ export declare const concat: (...arrays: Uint8Array[]) => Uint8Array; /** Cryptographically secure random bytes via Web Crypto API. */ export declare const randomBytes: (n: number) => Uint8Array; /** * Detects WASM SIMD support once and caches the result. * Used by init() to preflight-check before loading serpent/chacha20 modules. * Exported for consumers who want to feature-detect before calling init(). */ export declare function hasSIMD(): boolean;