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.4 to 1.2.5

21

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

@@ -29,15 +29,14 @@ "main": "src/jwk-to-pem.js",

"dependencies": {
"asn1.js": "^4.0.0",
"asn1.js-rfc3280": "^4.0.0",
"elliptic": "^6.0.1"
"asn1.js": "^4.5.2",
"elliptic": "^6.2.3"
},
"devDependencies": {
"chai": "^3.4.0",
"coveralls": "^2.11.4",
"eslint": "^1.10.3",
"eslint-config-brightspace": "^0.1.0",
"istanbul": "^0.4.0",
"jwa": "^1.1.0",
"mocha": "^2.3.3"
"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"
}
}
'use strict';
var asn1 = require('asn1.js'),
EC = require('elliptic').ec,
rfc3280 = require('asn1.js-rfc3280');
EC = require('elliptic').ec;

@@ -105,3 +104,3 @@ var b64ToBn = require('./b64-to-bn');

} else {
result = rfc3280.SubjectPublicKeyInfo.encode({
result = SubjectPublicKeyInfo.encode({
algorithm: {

@@ -143,2 +142,16 @@ algorithm: [1, 2, 840, 10045, 2, 1],

var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', /* @this */ function() {
this.seq().obj(
this.key('algorithm').objid(),
this.key('parameters').optional().any()
);
});
var SubjectPublicKeyInfo = asn1.define('SubjectPublicKeyInfo', /* @this */ function() {
this.seq().obj(
this.key('algorithm').use(AlgorithmIdentifier),
this.key('subjectPublicKey').bitstr()
);
});
module.exports = ecJwkToBuffer;
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