sodium-signatures
Sodium signatures that works in node and in the browser
Last updated 7 years ago by mafintosh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install sodium-signatures 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.1.1                                ...           latest (7 years ago)

12 Versions

  • 2.1.1                                ...           7 years ago
  • 2.1.0                                ...           7 years ago
  • 2.0.0                                ...           8 years ago
  • 1.4.1                                ...           8 years ago
  • 1.4.0                                ...           8 years ago
  • 1.3.0                                ...           8 years ago
  • 1.2.2                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (3)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |