encryptonite

1.0.1 • Public • Published

node-encryptonite

Module for aes-256-gcm encryption.

features

  • encrypt
  • decrypt

Installation

npm install encryptonite

How it works:

Encrypt data

const security = require('node-security');
 
const data = 'Hello World !';
 
const secure = security.encrypt(data, key);
 
// result
{
  content: '1016acd5af5b7b91985fc36d7b',
  vector: '73d1b9d375fa33c355b185dd',
  tag: 'bdea27df226f54da5bb9ed12e4312e12'
}

Decrypt data

const security = require('node-security');
 
security.decrypt({
  content: '1016acd5af5b7b91985fc36d7b',
  vector: '73d1b9d375fa33c355b185dd',
  tag: 'bdea27df226f54da5bb9ed12e4312e12'
}, key);
 
// result
'Hello World !'

Tests

Requirements:

  • npm
  • make

Run make deps once and then make test to launch the test suite.

License

The MIT License MIT

Dependencies (0)

    Dev Dependencies (7)

    Package Sidebar

    Install

    npm i encryptonite

    Weekly Downloads

    4

    Version

    1.0.1

    License

    ISC

    Last publish

    Collaborators

    • dial-once
    • dvasylenko
    • mrister
    • jkernech
    • ky23