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