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

Commit

Permalink
feat: use libp2p-crypto instead
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Dec 1, 2016
1 parent f2ccbc3 commit efba7fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
"run-parallel": "^1.1.6"
},
"dependencies": {
"libp2p-crypto": "^0.7.3",
"pull-handshake": "^1.1.4",
"pull-stream": "^3.5.0",
"random-bytes": "^1.0.0"
"pull-stream": "^3.5.0"
},
"contributors": [
"David Dias <daviddias.p@gmail.com>",
Expand Down
4 changes: 2 additions & 2 deletions src/util.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const randomBytes = require('random-bytes')
const crypto = require('libp2p-crypto')
const constants = require('./constants')

exports = module.exports
Expand All @@ -9,5 +9,5 @@ exports.rnd = (length) => {
if (!length) {
length = constants.PING_LENGTH
}
return randomBytes.sync(length)
return crypto.randomBytes(length)
}

0 comments on commit efba7fa

Please sign in to comment.