UNPKG

node-ciphers

Version:

Lightweight AES and DES encryption library for Node.js, featuring flexible encoding, multiple cipher modes, and TypeScript support.

23 lines 1.47 kB
import type { BinaryLike } from 'node:crypto'; import type { TransformOptions } from 'node:stream'; import type { HasAuthTagAesCipherEncodingOptions, Result } from '../types'; import { BaseAesCipher } from './base'; export declare class Gcm extends BaseAesCipher<HasAuthTagAesCipherEncodingOptions> { #private; constructor(key: BinaryLike, encodingOptions?: HasAuthTagAesCipherEncodingOptions, ivLength?: number); decrypt(encryptedData: BinaryLike, iv: BinaryLike, authTag: BinaryLike, authTagLength?: number, encodingOptions?: HasAuthTagAesCipherEncodingOptions.Decrypt, decipherOptions?: TransformOptions): Result<string>; decryptToJson<T = any>(encryptedData: BinaryLike, iv: BinaryLike, authTag: BinaryLike, authTagLength?: number, encodingOptions?: HasAuthTagAesCipherEncodingOptions.Decrypt, decipherOptions?: TransformOptions): Result<T>; encrypt(data: BinaryLike, authTagLength?: number, ivLength?: number, encodingOptions?: HasAuthTagAesCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions): Result<{ authTag: string; authTagLength?: number; data: string; iv: string; }>; encryptJson(data: any, authTagLength?: number, ivLength?: number, encodingOptions?: HasAuthTagAesCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions): Result<{ authTag: string; authTagLength?: number; data: string; iv: string; }>; } //# sourceMappingURL=gcm.d.ts.map