type BufferLike = ArrayBuffer | Uint8Array; type CryptoMaterial = BufferLike | CryptoKey; interface EncryptionResult { success: true; data: Uint8Array; } interface EncryptionError { success: false; error: string; } type EncryptionResponse = EncryptionResult | EncryptionError; interface DecryptionResult { success: true; data: Uint8Array; } interface DecryptionError { success: false; error: string; } type DecryptionResponse = DecryptionResult | DecryptionError; declare function encryptWithAES256GCM(key: CryptoMaterial, iv: BufferLike, data: BufferLike, header: BufferLike): Promise; declare function decryptWithAES256GCM(key: CryptoMaterial, iv: BufferLike, encryptedData: BufferLike, header: BufferLike): Promise; declare function isEncryptionSuccess(result: EncryptionResponse): result is EncryptionResult; declare function isDecryptionSuccess(result: DecryptionResponse): result is DecryptionResult; export { encryptWithAES256GCM, decryptWithAES256GCM, isEncryptionSuccess, isDecryptionSuccess, type EncryptionResponse, type DecryptionResponse, type BufferLike, type CryptoMaterial, };