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

ecdsa-sig-formatter

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecdsa-sig-formatter

Translate ECDSA signatures between ASN.1/DER and JOSE-style concatenation

  • 1.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7M
decreased by-55.56%
Maintainers
1
Weekly downloads
 
Created

What is ecdsa-sig-formatter?

The ecdsa-sig-formatter npm package is used to convert ECDSA signatures from ASN.1/DER encoded format to JOSE/JWT compact serialization format and vice versa. This is particularly useful when working with JWTs and other security tokens in Node.js applications.

What are ecdsa-sig-formatter's main functionalities?

DER to JOSE conversion

Converts a DER-encoded ECDSA signature to JOSE format. The second parameter ('ES256') specifies the algorithm used, which determines the expected size of the signature.

const ecdsaSigFormatter = require('ecdsa-sig-formatter');
const derSignature = '...'; // DER-encoded signature
const joseSignature = ecdsaSigFormatter.derToJose(derSignature, 'ES256');

JOSE to DER conversion

Converts a JOSE-encoded ECDSA signature to ASN.1/DER format. Similar to the previous function, the algorithm ('ES256') needs to be specified.

const ecdsaSigFormatter = require('ecdsa-sig-formatter');
const joseSignature = '...'; // JOSE-encoded signature
const derSignature = ecdsaSigFormatter.joseToDer(joseSignature, 'ES256');

Other packages similar to ecdsa-sig-formatter

Keywords

FAQs

Package last updated on 25 Jan 2019

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