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

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

Package Overview
Dependencies
Maintainers
4
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.24.1-unstable.10 to 0.24.1-unstable.63

1

dist/x509/x509-utils.d.ts

@@ -19,2 +19,3 @@ import { Certificate } from 'pkijs';

export declare const PEMToHex: (PEM: string, headerKey?: string) => string;
export declare function PEMToBinary(pem: string): Uint8Array;
/**

@@ -21,0 +22,0 @@ * Converts a base64 encoded string to hex string, removing any non-base64 characters, including newlines

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.derToPEM = exports.PEMToDer = exports.hexToPEM = exports.hexToBase64 = exports.base64ToHex = exports.PEMToHex = exports.publicKeyHexFromPEM = exports.hexKeyFromPEMBasedJwk = exports.privateKeyHexFromPEM = exports.PEMToJwk = exports.jwkToPEM = exports.toKeyObject = exports.areCertificatesEqual = exports.pemOrDerToX509Certificate = exports.x5cToPemCertChain = exports.pemCertChainTox5c = void 0;
exports.derToPEM = exports.PEMToDer = exports.hexToPEM = exports.hexToBase64 = exports.base64ToHex = exports.PEMToBinary = exports.PEMToHex = exports.publicKeyHexFromPEM = exports.hexKeyFromPEMBasedJwk = exports.privateKeyHexFromPEM = exports.PEMToJwk = exports.jwkToPEM = exports.toKeyObject = exports.areCertificatesEqual = exports.pemOrDerToX509Certificate = exports.x5cToPemCertChain = exports.pemCertChainTox5c = void 0;
const pkijs_1 = require("pkijs");

@@ -150,2 +150,10 @@ const u8a = __importStar(require("uint8arrays"));

exports.PEMToHex = PEMToHex;
function PEMToBinary(pem) {
const pemContents = pem
.replace(/^[^]*-----BEGIN [^-]+-----/, '')
.replace(/-----END [^-]+-----[^]*$/, '')
.replace(/\s/g, '');
return u8a.fromString(pemContents, 'base64pad');
}
exports.PEMToBinary = PEMToBinary;
/**

@@ -152,0 +160,0 @@ * Converts a base64 encoded string to hex string, removing any non-base64 characters, including newlines

4

package.json
{
"name": "@sphereon/ssi-sdk-ext.x509-utils",
"description": "Sphereon SSI-SDK plugin functions for X.509 Certificate handling.",
"version": "0.24.1-unstable.10+61bd444",
"version": "0.24.1-unstable.63+adfc57a",
"source": "src/index.ts",

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

],
"gitHead": "61bd4445b8a7e3da5bac0412d4359d9bf66df50c"
"gitHead": "adfc57aea4001853b32c0a0b0c910ea79ed83edf"
}

@@ -121,2 +121,11 @@ import { Certificate } from 'pkijs'

export function PEMToBinary(pem: string): Uint8Array {
const pemContents = pem
.replace(/^[^]*-----BEGIN [^-]+-----/, '')
.replace(/-----END [^-]+-----[^]*$/, '')
.replace(/\s/g, '')
return u8a.fromString(pemContents, 'base64pad')
}
/**

@@ -123,0 +132,0 @@ * Converts a base64 encoded string to hex string, removing any non-base64 characters, including newlines

Sorry, the diff of this file is not supported yet

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