We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58f12d4 commit 5850c11Copy full SHA for 5850c11
generate_key_pair.js
@@ -2,7 +2,7 @@ const dhive = require('@hiveio/dhive');
2
const Crypto = require('crypto')
3
let opts = {};
4
opts.addressPrefix = 'STM';
5
-const rando = Crypto.getRandomValues(new Uint16Array(32))
+const rando = Crypto.randomBytes(32).toString('hex');
6
const ownerKey = dhive.PrivateKey.fromLogin('thestandarduser', rando, 'spk');
7
console.log(ownerKey.toString(), ownerKey.createPublic(opts.addressPrefix).toString())
8
process.exit()
0 commit comments