Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

ecdsa-sig-formatter

Package Overview
Dependencies
1
Maintainers
1
Versions
10
Issues
File Explorer

Advanced tools

ecdsa-sig-formatter

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

    1.0.11latest

Version published
Maintainers
1
Weekly downloads
10,278,536
decreased by-8.78%

Weekly downloads

Readme

Source

ecdsa-sig-formatter

Build Status Coverage Status

Translate between JOSE and ASN.1/DER encodings for ECDSA signatures

Install

npm install ecdsa-sig-formatter --save

Usage

var format = require('ecdsa-sig-formatter'); var derSignature = '..'; // asn.1/DER encoded ecdsa signature var joseSignature = format.derToJose(derSignature);

API


.derToJose(Buffer|String signature, String alg) -> String

Convert the ASN.1/DER encoded signature to a JOSE-style concatenated signature. Returns a base64 url encoded String.

  • If signature is a String, it should be base64 encoded
  • alg must be one of ES256, ES384 or ES512

.joseToDer(Buffer|String signature, String alg) -> Buffer

Convert the JOSE-style concatenated signature to an ASN.1/DER encoded signature. Returns a Buffer

  • If signature is a String, it should be base64 url encoded
  • alg must be one of ES256, ES384 or ES512

Contributing

  1. Fork the repository. Committing directly against this repository is highly discouraged.

  2. Make your modifications in a branch, updating and writing new unit tests as necessary in the spec directory.

  3. Ensure that all tests pass with npm test

  4. rebase your changes against master. Do not merge.

  5. Submit a pull request to this repository. Wait for tests to run and someone to chime in.

Code Style

This repository is configured with EditorConfig and ESLint rules.

Keywords

FAQs

What is ecdsa-sig-formatter?

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

Is ecdsa-sig-formatter popular?

The npm package ecdsa-sig-formatter receives a total of 8,244,659 weekly downloads. As such, ecdsa-sig-formatter popularity was classified as popular.

Is ecdsa-sig-formatter well maintained?

We found that ecdsa-sig-formatter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 25 Jan 2019

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc