jwk-to-pem
Advanced tools
Comparing version 1.2.5 to 1.2.6
{ | ||
"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({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20984
246
3
+ Addedsafe-buffer@^5.0.1
+ Addedsafe-buffer@5.2.1(transitive)