node-ciphers
Version:
Lightweight AES and DES encryption library for Node.js, featuring flexible encoding, multiple cipher modes, and TypeScript support.
12 lines • 973 B
TypeScript
import type { BinaryLike } from 'node:crypto';
import type { TransformOptions } from 'node:stream';
import type { AesCipherEncodingOptions, EcbEncryptResult, Result } from '../types';
import { BaseAesCipher } from './base';
export declare class Ecb extends BaseAesCipher {
constructor(key: BinaryLike, encodingOptions?: AesCipherEncodingOptions);
decrypt(encryptedData: BinaryLike, iv?: null, encodingOptions?: AesCipherEncodingOptions.Decrypt, decipherOptions?: TransformOptions): Result<string>;
decryptToJson<T = any>(encryptedData: BinaryLike, iv?: null, encodingOptions?: AesCipherEncodingOptions.Decrypt, decipherOptions?: TransformOptions): Result<T>;
encrypt(data: BinaryLike, encodingOptions?: AesCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions): EcbEncryptResult;
encryptJson(data: any, encodingOptions?: AesCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions): EcbEncryptResult;
}
//# sourceMappingURL=ecb.d.ts.map