Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jwk-to-pem

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwk-to-pem - npm Package Compare versions

Comparing version 1.2.5 to 1.2.6

17

package.json
{
"name": "jwk-to-pem",
"version": "1.2.5",
"version": "1.2.6",
"description": "Convert a JSON Web Key to a PEM",

@@ -30,13 +30,14 @@ "main": "src/jwk-to-pem.js",

"asn1.js": "^4.5.2",
"elliptic": "^6.2.3"
"elliptic": "^6.2.3",
"safe-buffer": "^5.0.1"
},
"devDependencies": {
"chai": "^3.5.0",
"coveralls": "^2.11.9",
"eslint": "^2.5.1",
"eslint-config-brightspace": "^0.2.0",
"istanbul": "^0.4.2",
"jwa": "^1.1.3",
"mocha": "^2.4.5"
"coveralls": "^2.11.15",
"eslint": "^2.13.1",
"eslint-config-brightspace": "^0.2.4",
"istanbul": "^0.4.5",
"jwa": "^1.1.4",
"mocha": "^3.1.2"
}
}
'use strict';
var BN = require('asn1.js').bignum;
var BN = require('asn1.js').bignum,
Buffer = require('safe-buffer').Buffer;
module.exports = function base64ToBigNum(val, zero) {
var buf = new Buffer(val, 'base64');
var buf = Buffer.from(val, 'base64');
var bn = val = new BN(buf, 10, 'be').iabs();

@@ -8,0 +9,0 @@ if (zero) {

'use strict';
var asn1 = require('asn1.js'),
Buffer = require('safe-buffer').Buffer,
EC = require('elliptic').ec;

@@ -77,3 +78,3 @@

var subjectPublicKey = key.getPublic(compact, 'hex');
subjectPublicKey = new Buffer(subjectPublicKey, 'hex');
subjectPublicKey = Buffer.from(subjectPublicKey, 'hex');
subjectPublicKey = {

@@ -92,3 +93,3 @@ unused: 0,

var privateKey = key.getPrivate('hex');
privateKey = new Buffer(privateKey, 'hex');
privateKey = Buffer.from(privateKey, 'hex');

@@ -95,0 +96,0 @@ result = ECPrivateKey.encode({

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