New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

clay-crypto

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clay-crypto

Cryptographic utility for Clay DB

latest
Source
npmnpm
Version
4.0.5
Version published
Maintainers
2
Created
Source

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)
  const encrypted = encrypt('This is the message', privateKey)
  const decrypted = decrypt(encrypted, publicKey)

  console.log(decrypted)
}

Functions

Available functions

SignatureDescription
generate(bits) -> ArrayGenerate RSA key
sign(privateKey, text) -> stringCreate sign
stringify(value) -> stringStringify object
verify(publicKey, text, signature) -> booleanVerify text with signature

License

This software is released under the Apache-2.0 License.

Keywords

ClayDB

FAQs

Package last updated on 18 Jun 2019

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