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 { DesCipherEncodingOptions, EcbEncryptResult, Result } from '../types';
import { BaseDesCipher } from './base';
export declare class Ecb extends BaseDesCipher {
constructor(key: BinaryLike, encodingOptions?: DesCipherEncodingOptions);
decrypt(encryptedData: BinaryLike, iv?: null, encodingOptions?: DesCipherEncodingOptions.Decrypt, decipherOptions?: TransformOptions): Result<string>;
decryptToJson<T = any>(encryptedData: BinaryLike, iv?: null, encodingOptions?: DesCipherEncodingOptions.Decrypt, decipherOptions?: TransformOptions): Result<T>;
encrypt(data: BinaryLike, encodingOptions?: DesCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions): EcbEncryptResult;
encryptJson(data: any, encodingOptions?: DesCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions): EcbEncryptResult;
}
//# sourceMappingURL=ecb.d.ts.map