Socket
Book a DemoInstallSign in
Socket

asymmetrical-signing

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asymmetrical-signing

Asymmetrically sign any data

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

Asymmetrical Signing

NPM version Build status Test coverage Dependency Status License Downloads

Asymmetrical signing using secp256k1. Sign data with a private key, the allow others to verify the data with a public key.

Example

const asign = require('asymmetrical-signing')

// create keys
const privateKey = asign.createPrivateKey()
const publicKey = asign.createPublicKey(privateKey)

// convert some data into a message
const message = asign.createMessage({
  message: 'something'
})

// sign it with the private ey
const signature = asign.signMessage(message, privateKey)

// verify the data with a public key
console.log(asign.verifyMessage(message, signature, publicKey))

Data

Types of data supported:

  • string
  • Buffer
  • objects
  • arrays

FAQs

Package last updated on 02 Oct 2016

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