tanmayo7lock
v1.0.18
Published
encrypt decrypt
Downloads
310
Readme
Lock
Lock
is a Node.js library for encrypting and decrypting large data sets with chunk processing, allowing for optimized memory usage. This package is useful for scenarios where handling and securing big data in a memory-efficient way is crucial.
Installation
npm install tanmayo7lock
Usage
// Import necessary modules
import crypto from "crypto"; // Only import if running on Node.js
const { encrypt, decrypt } = require('tanmayo7lock');
const data = { message: "Confidential Message" };
// Encrypt the data
const encryptedData = encrypt(data);
console.log("Encrypted:", encryptedData);
// Decrypt the data
const decryptedData = decrypt(encryptedData);
console.log("Decrypted:", decryptedData); // Outputs: { message: "Confidential Message" }