Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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

About

Sodium signatures that works in node and in the browser

Resources

License

Sponsor this project

 
Learn more about GitHub Sponsors

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
You can’t perform that action at this time.