/** * Cross-platform crypto utilities that work in both Node.js and browser environments. * * Uses the Web Crypto API (globalThis.crypto) which is available in: * - All modern browsers * - Node.js 16+ (via globalThis.crypto / webcrypto) * * This avoids importing from 'crypto' which gets externalized by Vite * when bundling for the browser. */ /** * Generate cryptographically secure random bytes. * Uses globalThis.crypto.getRandomValues (works in both Node and browser). */ export declare function crossPlatformRandomBytes(length: number): Uint8Array; /** * Compute SHA-256 hash of the given data. * Uses Web Crypto API (async). */ export declare function crossPlatformSha256(data: Uint8Array): Promise; /** * Encrypt data using AES-256-GCM. * Returns { ciphertext, authTag }. */ export declare function aes256GcmEncrypt(key: Uint8Array, plaintext: Uint8Array, iv: Uint8Array): Promise<{ ciphertext: Uint8Array; authTag: Uint8Array; }>; /** * Decrypt data using AES-256-GCM. */ export declare function aes256GcmDecrypt(key: Uint8Array, ciphertext: Uint8Array, iv: Uint8Array, authTag: Uint8Array): Promise; //# sourceMappingURL=crossPlatformCrypto.d.ts.map