git ssb

1+

Dominic / ssb-keys



Tree: 741b9da9e7c2fe66c219256d3fb18b1051b2f7f3

Files: 741b9da9e7c2fe66c219256d3fb18b1051b2f7f3 / test / box-unbox.js

344 bytesRaw
1
2
3var tape = require('tape')
4var ssbkeys = require('../')
5
6tape('box, unbox', function (t) {
7
8 var alice = ssbkeys.generate()
9 var bob = ssbkeys.generate()
10
11 var boxed = ssbkeys.box({okay: true}, [bob.public, alice.public])
12 console.log('boxed')
13 var msg = ssbkeys.unbox(boxed, alice.private)
14 t.deepEqual(msg, {okay: true})
15 t.end()
16})
17

Built with git-ssb-web