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
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jwk-to-pem

Convert a JSON Web Key to a PEM

  • 2.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
783K
decreased by-11.71%
Maintainers
1
Weekly downloads
 
Created

What is jwk-to-pem?

The jwk-to-pem npm package is used to convert JSON Web Keys (JWK) to PEM format. This is particularly useful for cryptographic operations where PEM format is required, such as verifying JWTs, encrypting/decrypting data, and more.

What are jwk-to-pem's main functionalities?

Convert JWK to PEM

This feature allows you to convert a JSON Web Key (JWK) to PEM format. The code sample demonstrates how to import the jwk-to-pem package, define a JWK object, and convert it to PEM format.

const jwkToPem = require('jwk-to-pem');
const jwk = {
  kty: 'RSA',
  n: '0vx7agoebGcQSuuPiLJXZptN1R5Vb1nJ2sT7J4G...'
  e: 'AQAB'
};
const pem = jwkToPem(jwk);
console.log(pem);

Convert JWK to PEM with options

This feature allows you to convert a JWK to PEM format with additional options. The code sample shows how to specify options such as converting to a private key PEM format.

const jwkToPem = require('jwk-to-pem');
const jwk = {
  kty: 'RSA',
  n: '0vx7agoebGcQSuuPiLJXZptN1R5Vb1nJ2sT7J4G...'
  e: 'AQAB'
};
const options = { private: true };
const pem = jwkToPem(jwk, options);
console.log(pem);

Other packages similar to jwk-to-pem

Keywords

FAQs

Package last updated on 23 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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