Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

encrypter

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

encrypter

A Node.js encryption module

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
134
increased by103.03%
Maintainers
1
Weekly downloads
 
Created
Source

Encrypter

NodeJS encryption made easy.

npm version Build Status Quality

##Installation

The source is available for download from GitHub. Alternatively, you can install using Node Package Manager (npm):

npm install encrypter

##Usage

###initialize

var encrypter = new (require('encrypter'))(encryptionKey[, cipherAlgorithm[, messageDigestAlgorithm]])

where

encryptionKey - secret string key used for encryption

cipherAlgorithm - cipher Algorithm (default: aes-256-ctr).

Cipher algorithm is dependent on the available algorithms supported by the version of OpenSSL on the node platform. examples are 'aes192', etc. On recent releases, openssl list-cipher-algorithms will display the available cipher algorithms.

messageDigestAlgorithm - message digest algorithm(default: sha1).

Message digest algorithm is dependent on the available algorithms supported by the version of OpenSSL on the node platform. Examples are 'sha1', 'md5', 'sha256', 'sha512', etc. On recent releases, openssl list-message-digest-algorithms will display the available digest algorithms.

###encrypt and decrypt

With default algorithms:

var encrypter = new (require('encrypter'))("myEncryptionSecret");

var encrypted = encrypter.encrypt('Hello from quorra!');

var decrypted = encrypter.decrypt(encrypted); // Hello from quorra!

With custom algorithms:

var encrypter = new (require('encrypter'))("myEncryptionSecret", 'aes-256-ctc', 'sha256');

var encrypted = encrypter.encrypt('Hello from quorra!');

var decrypted = encrypter.decrypt(encrypted); // Hello from quorra!

##License

The Encrypter is open-sourced software licensed under the MIT license.

Keywords

FAQs

Package last updated on 16 Jan 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc