🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

cipherstream

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cipherstream

Simple Stream layer for encryption/decryption

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
4
-20%
Maintainers
1
Weekly downloads
 
Created
Source

cipherstream

cipherstream is a thin streaming layer for encryption/decryption in Node.JS.

Installation

npm install cipherstream

Usage

Require as cipherstream

var cipherstream = require("cipherstream");

CipherStream

CipherStream creates a Stream object which takes data in and encrypts it.

new CipherStream(password[, algorithm]) where algorithm defaults to AES192.

Example:

var cipherstream = require("cipherstream"),
    fs = require("fs");

fs.createReadStream("plain.txt").pipe(new cipherstream.CipherStream("secret")).pipe(fs.writeReadStream("secret.txt"));

DecipherStream

DecipherStream creates a Stream object which takes encrypted data in and decrypts it.

new DecipherStream(password[, algorithm]) where algorithm defaults to AES192.

Example:

var cipherstream = require("cipherstream"),
    fs = require("fs");

fs.createReadStream("secret.txt").pipe(new cipherstream.DecipherStream("secret")).pipe(fs.writeReadStream("plain.txt"));

HMAC

hmac is a simple wrapper function to create SHA-256 hmac values.

cipherstream.hmac(data, key) → String

License

MIT

Keywords

cipher

FAQs

Package last updated on 04 Apr 2013

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