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

@peculiar/jose

Package Overview
Dependencies
Maintainers
6
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peculiar/jose - npm Package Compare versions

Comparing version 1.5.4 to 1.6.1

16

build/cjs/jwk.js
"use strict";
var _cryptoProvider;
var _JsonWebKey_cryptoProvider;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -11,5 +11,5 @@ exports.JsonWebKey = void 0;

constructor(cryptoProvider, params = {}) {
_cryptoProvider.set(this, void 0);
_JsonWebKey_cryptoProvider.set(this, void 0);
Object.assign(this, params);
tslib_1.__classPrivateFieldSet(this, _cryptoProvider, cryptoProvider);
tslib_1.__classPrivateFieldSet(this, _JsonWebKey_cryptoProvider, cryptoProvider, "f");
}

@@ -19,3 +19,3 @@ async exportKey(...args) {

let keyUsages = ["verify"];
let crypto = tslib_1.__classPrivateFieldGet(this, _cryptoProvider);
let crypto = tslib_1.__classPrivateFieldGet(this, _JsonWebKey_cryptoProvider, "f");
if (arguments.length < 2) {

@@ -78,3 +78,3 @@ crypto = args[0] || crypto;

async digest(json, alg) {
const hash = await tslib_1.__classPrivateFieldGet(this, _cryptoProvider).subtle.digest({
const hash = await tslib_1.__classPrivateFieldGet(this, _JsonWebKey_cryptoProvider, "f").subtle.digest({
name: alg,

@@ -98,3 +98,3 @@ }, pvtsutils.BufferSourceConverter.toUint8Array(pvtsutils.Convert.FromUtf8String(json)));

};
return await tslib_1.__classPrivateFieldGet(this, _cryptoProvider).subtle.importKey("jwk", this, alg, true, ["verify"]);
return await tslib_1.__classPrivateFieldGet(this, _JsonWebKey_cryptoProvider, "f").subtle.importKey("jwk", this, alg, true, ["verify"]);
}

@@ -106,6 +106,6 @@ async getRsaPublicKey() {

};
return await tslib_1.__classPrivateFieldGet(this, _cryptoProvider).subtle.importKey("jwk", this, alg, true, ["verify"]);
return await tslib_1.__classPrivateFieldGet(this, _JsonWebKey_cryptoProvider, "f").subtle.importKey("jwk", this, alg, true, ["verify"]);
}
}
exports.JsonWebKey = JsonWebKey;
_cryptoProvider = new WeakMap();
_JsonWebKey_cryptoProvider = new WeakMap();

@@ -16,3 +16,3 @@ "use strict";

}
if (params.payload) {
if (params.payload !== undefined) {
this.setPayload(params.payload);

@@ -52,3 +52,8 @@ }

setPayload(data) {
this.payload = this.write(data);
if (data === "") {
this.payload = "";
}
else {
this.payload = this.write(data);
}
}

@@ -132,3 +137,3 @@ getSignature() {

}
if (this.payload) {
if (this.payload !== undefined) {
json.payload = this.payload;

@@ -135,0 +140,0 @@ }

@@ -1,2 +0,2 @@

var _cryptoProvider;
var _JsonWebKey_cryptoProvider;
import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";

@@ -8,5 +8,5 @@ import { Algorithms } from "./algorithms";

constructor(cryptoProvider, params = {}) {
_cryptoProvider.set(this, void 0);
_JsonWebKey_cryptoProvider.set(this, void 0);
Object.assign(this, params);
__classPrivateFieldSet(this, _cryptoProvider, cryptoProvider);
__classPrivateFieldSet(this, _JsonWebKey_cryptoProvider, cryptoProvider, "f");
}

@@ -16,3 +16,3 @@ async exportKey(...args) {

let keyUsages = ["verify"];
let crypto = __classPrivateFieldGet(this, _cryptoProvider);
let crypto = __classPrivateFieldGet(this, _JsonWebKey_cryptoProvider, "f");
if (arguments.length < 2) {

@@ -75,3 +75,3 @@ crypto = args[0] || crypto;

async digest(json, alg) {
const hash = await __classPrivateFieldGet(this, _cryptoProvider).subtle.digest({
const hash = await __classPrivateFieldGet(this, _JsonWebKey_cryptoProvider, "f").subtle.digest({
name: alg,

@@ -95,3 +95,3 @@ }, pvtsutils.BufferSourceConverter.toUint8Array(pvtsutils.Convert.FromUtf8String(json)));

};
return await __classPrivateFieldGet(this, _cryptoProvider).subtle.importKey("jwk", this, alg, true, ["verify"]);
return await __classPrivateFieldGet(this, _JsonWebKey_cryptoProvider, "f").subtle.importKey("jwk", this, alg, true, ["verify"]);
}

@@ -103,5 +103,5 @@ async getRsaPublicKey() {

};
return await __classPrivateFieldGet(this, _cryptoProvider).subtle.importKey("jwk", this, alg, true, ["verify"]);
return await __classPrivateFieldGet(this, _JsonWebKey_cryptoProvider, "f").subtle.importKey("jwk", this, alg, true, ["verify"]);
}
}
_cryptoProvider = new WeakMap();
_JsonWebKey_cryptoProvider = new WeakMap();

@@ -13,3 +13,3 @@ import { Convert } from "pvtsutils";

}
if (params.payload) {
if (params.payload !== undefined) {
this.setPayload(params.payload);

@@ -49,3 +49,8 @@ }

setPayload(data) {
this.payload = this.write(data);
if (data === "") {
this.payload = "";
}
else {
this.payload = this.write(data);
}
}

@@ -129,3 +134,3 @@ getSignature() {

}
if (this.payload) {
if (this.payload !== undefined) {
json.payload = this.payload;

@@ -132,0 +137,0 @@ }

{
"name": "@peculiar/jose",
"version": "1.5.4",
"version": "1.6.1",
"description": "Implementation of Javascript Object Signing and Encryption (jose)",

@@ -47,3 +47,3 @@ "keywords": [

"homepage": "https://github.com/PeculiarVentures/acme-ts#readme",
"gitHead": "9bb8a85c9ae7ecf37bc3ac0b55116fea0e71653e"
"gitHead": "3368f601d1ffb048a9dc9ffb6e69fcbd3d7669d8"
}
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