node-ciphers
Version:
Lightweight AES and DES encryption library for Node.js, featuring flexible encoding, multiple cipher modes, and TypeScript support.
23 lines • 869 B
TypeScript
import { BaseCipherEncodingOptions } from "./options.js";
import { AesCipherAlgorithm, AesCipherMode, HasAuthTagAesCipherEncodingOptions } from "./aes.js";
import { DesCipherAlgorithm, DesCipherMode } from "./des.js";
//#region src/types/index.d.ts
type BaseEncryptResult = Result<{
data: string;
iv: string;
}>;
type EcbEncryptResult = Result<{
data: string;
iv: null;
}>;
type Result<T> = {
error: unknown;
ok: false;
value?: never;
} | {
ok: true;
value: T;
};
//#endregion
export { type AesCipherAlgorithm, type BaseCipherEncodingOptions as AesCipherEncodingOptions, type AesCipherMode, type BaseCipherEncodingOptions, BaseEncryptResult, type DesCipherAlgorithm, type BaseCipherEncodingOptions as DesCipherEncodingOptions, type DesCipherMode, EcbEncryptResult, type HasAuthTagAesCipherEncodingOptions, Result };
//# sourceMappingURL=index.d.ts.map