git ssb

1+

Dominic / ssb-keys



Commit bb67911fcc0812000fcd96fbcabf11ef9d29a48b

test sign and verify

Dominic Tarr committed on 5/28/2015, 8:06:19 PM
Parent: 4a7f18b92164ae999f72c2edcdebf98a06b763c8

Files changed

test/index.jschanged
test/index.jsView
@@ -25,4 +25,19 @@
2525 t.equal(k1.private.toString('hex'), k2.private.toString('hex'))
2626 t.equal(k1.public.toString('hex'), k2.public.toString('hex'))
2727 t.end()
2828 })
29+
30+
31+tape('sign and verify', function (t) {
32+
33+ var keys = ssbkeys.generate()
34+ var msg = ssbkeys.hash("HELLO THERE?")
35+ var sig = ssbkeys.sign(keys, msg)
36+ console.log('public', keys.public)
37+ console.log('sig', sig)
38+ t.ok(sig)
39+ t.ok(ssbkeys.verify(keys, sig, msg))
40+
41+ t.end()
42+
43+})

Built with git-ssb-web