git ssb

1+

Dominic / ssb-keys



Tree: 3a5b82bd19a19d9f6cc51b0cde25b77c7ee08e62

Files: 3a5b82bd19a19d9f6cc51b0cde25b77c7ee08e62 / README.md

704 bytesRaw

SSB-Keys

A common module for secure-scuttlebutt projects, provides an API to create or load elliptic-curve keypairs.

var ssbkeys = require('ssb-keys')

ssbkeys.create(path, function(err, k) {
  console.log(k) /* => {
    id: Buffer(...),
    public: Buffer(...),
    private: Buffer(...)
  }*/
})

ssbkeys.load(path, function(err, k) {
  console.log(k) /* => {
    id: Buffer(...),
    public: Buffer(...),
    private: Buffer(...)
  }*/
})

var k = ssbkeys.createSync(path)
console.log(k) /* => {
  id: Buffer(...),
  public: Buffer(...),
  private: Buffer(...)
}*/

var k = ssbkeys.loadSync(path)
console.log(k) /* => {
  id: Buffer(...),
  public: Buffer(...),
  private: Buffer(...)
}*/

Built with git-ssb-web