@breezistdev/file-encryption
v1.0.1
Published
This is a very simple package for asynchronously encrypting and decrypting files using Node.js and the built-in crypto module.
Readme
file-encryption
This is a very simple package for asynchronously encrypting and decrypting files using Node.js and the built-in crypto module.
Requirements
- Node.js
- node:crypto built-in module (or crpyto version 1.0.1)
Installation
npm i @breezistdev/file-encryptionUsage
// Encrypting
import fileEncryption from `@breezistdev/file-encryption`
const encryptor = new fileEncryption( FILE_PATH );
encryptor.encrypt(`The quick brown fox jumped over the lazy dog.`)
// Decrypting
import fileEncryption from `@breezistdev/file-encryption`
const encryptor = new fileEncryption( FILE_PATH.enc );
encryptor.decrypt(`The quick brown fox jumped over the lazy dog.`)