git ssb

1+

Dominic / ssb-keys



Tree: b1b65011b395cada507b007a22398f4ad4d3f532

Files: b1b65011b395cada507b007a22398f4ad4d3f532 / 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