
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
folder-encrypt
Advanced tools
Simple module that helps you encrypt & decrypt folder/file with password.
Simple module that helps you encrypt & decrypt folder/file with password.
npm i folder-encrypt
Both methods (encrypt, decrypt) of folder-encrypt use Promise, and it will automatically detect whether this path is a file or directory.
import * as folderEncrypt from 'folder-encrypt';
folderEncrypt.encrypt({
password: 'your-password',
input: 'your-file-or-folder',
output: 'your-file-or-folder.encrypted' // optional, default will be input path with extension `encrypted`
}).then(() => {
console.log('encrypted!');
}).catch((err) => {
console.log(err);
});
import * as folderEncrypt from 'folder-encrypt';
import { Writable } from 'stream';
import * as fs from 'fs';
const outputs = [
fs.createWriteStream('./output1'),
fs.createWriteStream('./output2')
], writeStream = new Writable({
write(chunk, encoding, next) {
for (let i = outputs.length; i--;) outputs[i].write(chunk);
next();
}
});
folderEncrypt.encrypt({
password: 'your-password',
input: 'your-file-or-folder',
output: writeStream // writable stream
}).then(() => {
console.log('encrypted!');
}).catch((err) => {
console.log(err)
});
folderEncrypt.decrypt({
password: 'your-password',
input: 'your-file-or-folder.encrypted',
output: 'your-file-or-folder' // optional, default will be input path without extension
}).then(() => {
console.log('decrypted!');
// when using a wrong password on file decryption, the file will be decrypted to a bunch of garbled text.
// But still considered `decrypted` due to there is no way knowing the original content.
}).catch((err) => {
console.log(err);
// when using a wrong password on directory decryption, a `tar is corrupted` error will occured.
});
FAQs
Simple module that helps you encrypt & decrypt folder/file with password.
The npm package folder-encrypt receives a total of 70 weekly downloads. As such, folder-encrypt popularity was classified as not popular.
We found that folder-encrypt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.