Socket
Socket
Sign inDemoInstall

sodium-signatures

Package Overview
Dependencies
25
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sodium-signatures

Sodium signatures that works in node and in the browser


Version published
Weekly downloads
55
increased by150%
Maintainers
1
Install size
572 kB
Created
Weekly downloads
 

Readme

Source

sodium-signatures

Sodium signatures that works in node and in the browser

npm install sodium-signatures

build status

Usage

var signatures = require('sodium-signatures')

var keys = signatures.keyPair()
var message = new Buffer('a message')

var signature = signatures.sign(message, keys.secretKey)
var verified = signatures.verify(message, signature, keys.publicKey)

console.log('message was verified', verified)

API

keys = signatures.keyPair([seed])

Generate a public key and a secret key, optionally using a 32-byte seed (crypto_sign_SEEDBYTES defines this length)

signature = signature.sign(message, secretKey)

Sign a message.

verified = signature.verify(message, signature, publicKey)

Verify a message and signature.

License

MIT

FAQs

Last updated on 20 Jan 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc