dl-encryptor
v0.0.1
Published
A scalable TypeScript encryption utility supporting RSA, AES, ECC with auto key generation.
Maintainers
Readme
🔐 dl-encryptor
A TypeScript encryption library supporting RSA, AES, and ECC with auto key generation, JSON support, and extensible design.
✅ Features
- RSA-2048 (asymmetric)
- AES-256-CBC (symmetric)
- ECC (asymmetric placeholder)
- Automatic key generation
- JSON and string data encryption
- Modular structure
📦 Install
npm install dl-encryptor📄 Usage
import { encrypt, decrypt, EncryptionFormat } from "dl-encryptor";
const data = { user: "admin", password: "1234" };
// AES Encryption
const encrypted = encrypt(data, EncryptionFormat.AES_256);
// AES Decryption
const decrypted = decrypt(encrypted.encryptedData, EncryptionFormat.AES_256, encrypted.keysUsed);
console.log(encrypted);
console.log(decrypted); // { user: "admin", password: "1234" }
