git ssb

1+

Dominic / ssb-keys



Commit 1a34ba680e6e6efa7e5c46b8684644ecba505534

test for encryption

Dominic Tarr committed on 7/1/2015, 10:52:31 PM
Parent: f4380f9ce8faaa476434e9abefc231a9802e73d4

Files changed

test/box-unbox.jsadded
test/box-unbox.jsView
@@ -1,0 +1,16 @@
1+
2+
3+var tape = require('tape')
4+var ssbkeys = require('../')
5+
6+tape('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+})

Built with git-ssb-web