node-ciphers
Version:
Lightweight AES and DES encryption library for Node.js, featuring flexible encoding, multiple cipher modes, and TypeScript support.
16 lines • 1.65 kB
TypeScript
import type { BinaryLike, CipherCCM, CipherCCMOptions, CipherGCM, CipherGCMOptions, Cipheriv, DecipherCCM, DecipherGCM, Decipheriv } from 'node:crypto';
import type { TransformOptions } from 'node:stream';
import { BaseCipher } from '../../base';
import type { AesCipherEncodingOptions, AesCipherMode, HasAuthTagAesCipherEncodingOptions } from '../../types';
export declare abstract class BaseAesCipher<EncodingOptions extends HasAuthTagAesCipherEncodingOptions = AesCipherEncodingOptions> extends BaseCipher<EncodingOptions> {
#private;
constructor(key: BinaryLike, mode: AesCipherMode, encodingOptions?: EncodingOptions);
get algorithm(): "aes-128-cbc" | "aes-128-ccm" | "aes-128-cfb1" | "aes-128-cfb8" | "aes-128-cfb" | "aes-128-ctr" | "aes-128-ecb" | "aes-128-gcm" | "aes-128-ofb" | "aes-192-cbc" | "aes-192-ccm" | "aes-192-cfb1" | "aes-192-cfb8" | "aes-192-cfb" | "aes-192-ctr" | "aes-192-ecb" | "aes-192-gcm" | "aes-192-ofb" | "aes-256-cbc" | "aes-256-ccm" | "aes-256-cfb1" | "aes-256-cfb8" | "aes-256-cfb" | "aes-256-ctr" | "aes-256-ecb" | "aes-256-gcm" | "aes-256-ofb";
protected createCipher(iv: BinaryLike, options: CipherCCMOptions): CipherCCM;
protected createCipher(iv: BinaryLike, options: CipherGCMOptions): CipherGCM;
protected createCipher(iv: BinaryLike | null, options?: TransformOptions): Cipheriv;
protected createDecipher(iv: BinaryLike, options: CipherCCMOptions): DecipherCCM;
protected createDecipher(iv: BinaryLike, options: CipherGCMOptions): DecipherGCM;
protected createDecipher(iv: BinaryLike | null, options?: TransformOptions): Decipheriv;
}
//# sourceMappingURL=index.d.ts.map