bitcluster

2.0.1 • Public • Published

Bitcluster

Bitcluster is a simple wrapper for Crypto-JS that makes client-side encryption painless, and validation easier.

Install:

npm install --save bitcluster

To encrypt:

// using node

var Bitcluster = require('bitcluster')

// or React:

import Bitcluster from 'bitcluster';

var obj = {
  data: 'whatever data you'd like to encrypt',
  key: 'your super secret password'
}

var res = Bitcluster.encrypt(obj)

// returns:
{
  h1: 'Hash 1',
  h2: 'Hash 2',
  hash: 'The hash used to verify contents when decrypting'
}

To decrypt:

// using node

var Bitcluster = require('bitcluster')

// or React:

import Bitcluster from 'bitcluster';

var obj = {
  h1: 'Hash 1',
  h2: 'Hash 2',
  hash: 'The hash used to verify contents when decrypting',
  pass: 'super secret password'
}

var res = Bitcluster.decrypt(obj)

// returns:
{
  data: 'whatever you encrypted',
  status: 'OK'
}

It's as simple as that: completely client-side encryption.

Package Sidebar

Install

npm i bitcluster

Weekly Downloads

2

Version

2.0.1

License

ISC

Unpacked Size

4.39 kB

Total Files

4

Last publish

Collaborators

  • drewlong