clay-crypto
Cryptographic utility for Clay DB
Last updated 7 months ago by realglobe .
Apache-2.0 · Repository · Bugs · Original npm · Tarball
$ cnpm install clay-crypto 
SYNC missed versions from official npm registry.

clay-crypto

Build Status npm Version JS Standard

Cryptographic utility for Clay DB

Installation

$ npm install clay-crypto --save

Usage

'use strict'

const {
  generate,
  encrypt, decrypt
} = require('clay-crypto')

{
  const { publicKey, privateKey } = generate('', 2048)
  let encrypted = encrypt('This is the message', privateKey)
  let decrypted = decrypt(encrypted, publicKey)

  console.log(decrypted)
}

Functions

Available functions

Signature Description
generate(bits) -> Array Generate RSA key
sign(privateKey, text) -> string Create sign
stringify(value) -> string Stringify object
verify(publicKey, text, signature) -> boolean Verify text with signature

License

This software is released under the Apache-2.0 License.

Links

Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (14)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |