Socket
Socket
Sign inDemoInstall

peer-id

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peer-id - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

2

package.json
{
"name": "peer-id",
"version": "0.6.0",
"version": "0.6.1",
"description": "IPFS Peer Id implementation in Node.js",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -100,5 +100,11 @@ /*

// generation
exports.create = function () {
exports.create = function (opts) {
opts = opts || {}
opts.bits = opts.bits || 2048
// generate keys
const pair = forge.rsa.generateKeyPair({ bits: 2048, e: 0x10001 })
const pair = forge.rsa.generateKeyPair({
bits: opts.bits,
e: 0x10001
})

@@ -105,0 +111,0 @@ // return the RSA public/private key to asn1 object

@@ -65,3 +65,10 @@ /* globals describe, it */

})
it('Non-default # of bits', (done) => {
const shortId = PeerId.create({ bits: 128 })
const longId = PeerId.create({ bits: 256 })
expect(shortId.privKey.length).is.below(longId.privKey.length)
done()
})
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc