~ev/dexbox

58f63ad7f312bd322b3358afb4647482df8b17a3 — Ev Bogue 2 years ago 00f0eba
add a nonce generator
1 files changed, 6 insertions(+), 0 deletions(-)

A random.js
A random.js => random.js +6 -0
@@ 0,0 1,6 @@
var nacl = require('tweetnacl')
    nacl.utils = require('tweetnacl-util')

var nonce = nacl.randomBytes(nacl.box.nonceLength)

console.log(nacl.utils.encodeBase64(nonce))