Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
node-secure-stream
Advanced tools
This is a module that is designed to help use asymmetric encryption over streams. Even though there are modules that support RSA widely, they can't handle large files (where large means about >2k). The recommended solution to this is to make a random key, encrypt that using RSA, and then use the random key to encrypt the rest of the data using AES256.
This module does that, essentially over a stream. There is a little more to it than that, but not much. Streams written in are secure, and can only be decrypted by the matching private key.
There are other modules that do this, but their dependencies are broken, not cleanly at the top level either.
Very similar to hybrid-rsa-stream
For encryption:
var SecureStreams = require('node-secure-stream');
var fs = require('fs');
var public_key = fs.readFileSync(__dirname + '/files/public');
var enc = new SecureStreams.Encrypter({public_key: public_key})
process.stdin.pipe(enc).pipe(process.stdout);
For decryption:
var SecureStreams = require('node-secure-stream');
var fs = require('fs');
var private_key = fs.readFileSync(__dirname + '/files/private');
var dec = new SecureStreams.Decrypter({key: private_key});
process.stdin.pipe(dec).pipe(process.stdout);
Essentially the same as hybrid-rsa-stream
, kind of
Copyright (c) 2017. Stuart Watt.
Licensed under the MIT License.
Version 0.1.1 - 13th December 2018
FAQs
Stream-based encryption for large amounts of data
The npm package node-secure-stream receives a total of 0 weekly downloads. As such, node-secure-stream popularity was classified as not popular.
We found that node-secure-stream 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.