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

jose-browser-runtime

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jose-browser-runtime - npm Package Compare versions

Comparing version 4.6.0 to 4.6.1

3

dist/browser/jwks/local.js

@@ -42,4 +42,5 @@ import { importJWK } from '../key/import.js';

const { alg, kid } = { ...protectedHeader, ...token.header };
const kty = getKtyFromAlg(alg);
const candidates = this._jwks.keys.filter((jwk) => {
let candidate = jwk.kty === getKtyFromAlg(alg);
let candidate = kty === jwk.kty;
if (candidate && typeof kid === 'string') {

@@ -46,0 +47,0 @@ candidate = kid === jwk.kid;

@@ -42,17 +42,11 @@ import digest from '../runtime/digest.js';

const iterations = Math.ceil((bits >> 3) / 32);
let res;
for (let iter = 1; iter <= iterations; iter++) {
const res = new Uint8Array(iterations * 32);
for (let iter = 0; iter < iterations; iter++) {
const buf = new Uint8Array(4 + secret.length + value.length);
buf.set(uint32be(iter));
buf.set(uint32be(iter + 1));
buf.set(secret, 4);
buf.set(value, 4 + secret.length);
if (!res) {
res = await digest('sha256', buf);
}
else {
res = concat(res, await digest('sha256', buf));
}
res.set(await digest('sha256', buf), iter * 32);
}
res = res.slice(0, bits >> 3);
return res;
return res.slice(0, bits >> 3);
}

@@ -18,5 +18,8 @@ import { encoder, decoder } from '../lib/buffer_utils.js';

export const decodeBase64 = (encoded) => {
return new Uint8Array(atob(encoded)
.split('')
.map((c) => c.charCodeAt(0)));
const binary = atob(encoded);
const bytes = new Uint8Array(binary.length);
for (let i = 0; i < binary.length; i++) {
bytes[i] = binary.charCodeAt(i);
}
return bytes;
};

@@ -23,0 +26,0 @@ export const decode = (input) => {

{
"name": "jose-browser-runtime",
"version": "4.6.0",
"version": "4.6.1",
"homepage": "https://github.com/panva/jose",

@@ -5,0 +5,0 @@ "repository": "panva/jose",

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