Files: 1a34ba680e6e6efa7e5c46b8684644ecba505534 / test / box-unbox.js
344 bytesRaw
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 | }) |
17 |
Built with git-ssb-web