diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2016-09-30 01:05:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-30 01:05:43 +0300 |
commit | 3f46e2edd5e9bb346666ba0b489282d377db22f7 (patch) | |
tree | acdb4e21e4d38be93c04250e4697a361c9d3d506 /index.js | |
parent | 9fe008f7308e5c8fc2f4d3ce52f4fb54eb285744 (diff) | |
parent | 07ebb2f141b33322506e90b6676f42a6c909929c (diff) |
Merge pull request #932 from feross/peerid
Add more peer ID entropy
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -65,7 +65,7 @@ function WebTorrent (opts) { } else if (Buffer.isBuffer(opts.peerId)) { self.peerId = opts.peerId.toString('hex') } else { - self.peerId = Buffer.from(VERSION_PREFIX + randombytes(6).toString('hex')).toString('hex') + self.peerId = Buffer.from(VERSION_PREFIX + randombytes(9).toString('base64')).toString('hex') } self.peerIdBuffer = Buffer.from(self.peerId, 'hex') |