0.0.2 • Published 7 years ago

client_side_encryption v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Scribe Client-Side Encryption

This library provides a convenient way to encrypt and decrypt javascript objects.

Install

  • npm $ npm install client_side_encryption --save
  • yarn $ yarn add client_side_encryption

How to use

// Create a new Crypt object
let crypt = new Crypt('password', 'saltKey')

// encrypt an object
let obj = {test: 123}
crypt.encrypt(obj) //-> U2Fsd...

// decrypt an object
crypt.decrypt('U2Fsd...') //-> {test: 123}

// verify password
crypt.verifyPassword('password') //-> true
crypt.verifyPassword('wrong') //-> false