🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

archiver-zip-encryptable

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

archiver-zip-encryptable

An extension for archiver to zip with password encryption.

1.0.10
latest
Source
npm
Version published
Maintainers
1
Created
Source

archiver-zip-encryptable

An extension for archiver to zip with password encryption.

GitHub Actions master AppVeyor master Coveralls master npm GitHub license

This extension adds some formats to handle encryption to archiver.
Currently this package supports only creating zip with traditional PKWARE encryption.

Install

npm install archiver-zip-encryptable --save

Usage

Call archiver.registerFormat() to register this module to archiver, then archive with password.

var fs = require('fs');
var archiver = require('archiver');

archiver.registerFormat('zip-encryptable', require('archiver-zip-encryptable'));

var output = fs.createWriteStream(__dirname + '/example.zip');

var archive = archiver('zip-encryptable', {
    zlib: { level: 9 },
    forceLocalTime: true,
    password: 'test'
});
archive.pipe(output);

archive.append(Buffer.from('Hello World'), { name: 'test.txt' });
archive.append(Buffer.from('Good Bye'), { name: 'test2.txt' });

archive.finalize();

Credits

License

MIT

Keywords

zip

FAQs

Package last updated on 13 Jul 2021

Did you know?

Socket

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.

Install

Related posts