//#region src/common/crypto/xaes.d.ts /** * Encrypts data using XAES-256-GCM with the given key and iv. * Key must be a 256-bit AES-CBC CryptoKey with 'encrypt' usage. */ declare function encryptXAES(params: { iv: BufferSource; additionalData?: BufferSource; }, key: CryptoKey, data: BufferSource): Promise; /** * Decrypts data using XAES-256-GCM with the given key and iv. * Key must be a 256-bit AES-CBC CryptoKey with 'encrypt' and 'decrypt' usages. */ declare function decryptXAES(params: { iv: BufferSource; additionalData?: BufferSource; }, key: CryptoKey, data: BufferSource): Promise; /** * Generate a random key suitable for XAES-256-GCM. * The actual key is an AES-CBC CryptoKey with 256-bit length. * * This function is not necessary, as you can use crypto.subtle.generateKey with AES-CBC directly. */ declare function generateKeyXAES(extractable?: boolean): Promise; /** * Import a key suitable for XAES-256-GCM. * The actual key must be an AES-CBC CryptoKey with 256-bit length. * * This function is not necessary, as you can use crypto.subtle.importKey with AES-CBC directly. */ declare function importKeyXAES(format: 'jwk' | 'raw' | 'pkcs8' | 'spki', keyData: BufferSource | JsonWebKey, extractable?: boolean): Promise; /** * Export a key. * The resulting export will have AES-CBC algorithm specified. * * This function is not necessary, as you can use crypto.subtle.exportKey directly. */ declare function exportKeyXAES(format: 'jwk' | 'pkcs8' | 'raw' | 'spki', key: CryptoKey): Promise; //#endregion export { importKeyXAES as a, generateKeyXAES as i, encryptXAES as n, exportKeyXAES as r, decryptXAES as t }; //# sourceMappingURL=xaes-CTLXxroU.d.mts.map