Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Commit

Permalink
fix: stop using lack of default memset as random number generator
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Dec 1, 2016
1 parent a10bb7c commit 9ee10ad
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/util.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict'

const randomBytes = require('random-bytes')
const config = require('./config')

exports = module.exports
exports.genPingValue = (length) => {
if (!length) {
length = config.PING_LENGTH
}
return randomBytes.sync(length)
}

0 comments on commit 9ee10ad

Please sign in to comment.