New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sphereon/ssi-sdk-ext.key-utils

Package Overview
Dependencies
Maintainers
4
Versions
356
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sphereon/ssi-sdk-ext.key-utils - npm Package Compare versions

Comparing version 0.12.1-next.8 to 0.12.1-next.9

8

dist/functions.js

@@ -133,5 +133,9 @@ "use strict";

const toSecp256r1Jwk = (publicKeyHex, use) => {
assertProperKeyLength(publicKeyHex, 64);
const prefix = '';
/*if (publicKeyHex.length === 128) {
prefix = "04"
}*/
const publicKey = `${prefix}${publicKeyHex}`; // We add the 'uncompressed' type 04 prefix
assertProperKeyLength(publicKey, 66);
const secp256r1 = new elliptic_1.default.ec('p256');
const publicKey = `03${publicKeyHex}`; // We add the 'compressed' type 03 prefix
const key = secp256r1.keyFromPublic(publicKey, 'hex');

@@ -138,0 +142,0 @@ const pubPoint = key.getPublic();

{
"name": "@sphereon/ssi-sdk-ext.key-utils",
"description": "Sphereon SSI-SDK plugin for key creation.",
"version": "0.12.1-next.8+9061e29",
"version": "0.12.1-next.9+f5cd4dd",
"source": "src/index.ts",

@@ -48,3 +48,3 @@ "main": "dist/index.js",

],
"gitHead": "9061e2968005931127c52febbb3326fddcd62fb2"
"gitHead": "f5cd4ddd4f0cd0f155dcbf3a7e8b43c89b97cacb"
}

@@ -117,5 +117,10 @@ import { randomBytes } from '@ethersproject/random'

const toSecp256r1Jwk = (publicKeyHex: string, use?: JwkKeyUse): JsonWebKey => {
assertProperKeyLength(publicKeyHex, 64)
const prefix = ''
/*if (publicKeyHex.length === 128) {
prefix = "04"
}*/
const publicKey = `${prefix}${publicKeyHex}` // We add the 'uncompressed' type 04 prefix
assertProperKeyLength(publicKey, 66)
const secp256r1 = new elliptic.ec('p256')
const publicKey = `03${publicKeyHex}` // We add the 'compressed' type 03 prefix
const key = secp256r1.keyFromPublic(publicKey, 'hex')

@@ -122,0 +127,0 @@ const pubPoint = key.getPublic()

Sorry, the diff of this file is not supported yet

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