UNPKG

node-ciphers

Version:

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

17 lines (16 loc) 1.07 kB
import { BaseCipherEncodingOptions } from "../types/options.js"; import { EcbEncryptResult, Result } from "../types/index.js"; import { BaseDesCipher } from "./_internals/base/index.js"; import { BinaryLike } from "node:crypto"; import { TransformOptions } from "node:stream"; //#region src/des/ecb.d.ts declare class Ecb extends BaseDesCipher { constructor(key: BinaryLike, encodingOptions?: BaseCipherEncodingOptions); decrypt(encryptedData: BinaryLike, iv?: null, encodingOptions?: BaseCipherEncodingOptions.Decrypt, decipherOptions?: TransformOptions): Result<string>; decryptToJson<T = any>(encryptedData: BinaryLike, iv?: null, encodingOptions?: BaseCipherEncodingOptions.Decrypt, decipherOptions?: TransformOptions): Result<T>; encrypt(data: BinaryLike, encodingOptions?: BaseCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions): EcbEncryptResult; encryptJson(data: any, encodingOptions?: BaseCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions): EcbEncryptResult; } //#endregion export { Ecb }; //# sourceMappingURL=ecb.d.ts.map