node-ciphers
Version:
Lightweight AES and DES encryption library for Node.js, featuring flexible encoding, multiple cipher modes, and TypeScript support.
24 lines (23 loc) • 830 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 { AesCipherAlgorithm, BaseCipherEncodingOptions as AesCipherEncodingOptions, AesCipherMode, BaseCipherEncodingOptions, BaseEncryptResult, DesCipherAlgorithm, BaseCipherEncodingOptions as DesCipherEncodingOptions, DesCipherMode, EcbEncryptResult, HasAuthTagAesCipherEncodingOptions, Result };
//# sourceMappingURL=index.d.ts.map