ecdsa-sig-formatter

WebJar for ecdsa-sig-formatter

License

License

Categories

Categories

ORM Data
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

ecdsa-sig-formatter
Last Version

Last Version

1.0.11
Release Date

Release Date

Type

Type

jar
Description

Description

ecdsa-sig-formatter
WebJar for ecdsa-sig-formatter
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/Brightspace/node-ecdsa-sig-formatter

Download ecdsa-sig-formatter

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/ecdsa-sig-formatter/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>ecdsa-sig-formatter</artifactId>
    <version>1.0.11</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/ecdsa-sig-formatter/
implementation 'org.webjars.npm:ecdsa-sig-formatter:1.0.11'
// https://jarcasting.com/artifacts/org.webjars.npm/ecdsa-sig-formatter/
implementation ("org.webjars.npm:ecdsa-sig-formatter:1.0.11")
'org.webjars.npm:ecdsa-sig-formatter:jar:1.0.11'
<dependency org="org.webjars.npm" name="ecdsa-sig-formatter" rev="1.0.11">
  <artifact name="ecdsa-sig-formatter" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='ecdsa-sig-formatter', version='1.0.11')
)
libraryDependencies += "org.webjars.npm" % "ecdsa-sig-formatter" % "1.0.11"
[org.webjars.npm/ecdsa-sig-formatter "1.0.11"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : safe-buffer jar [5.0.1,6)

Project Modules

There are no modules declared in this project.

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.

org.webjars.npm

Brightspace

The official public code repository of Brightspace and D2L Corporation.

Versions

Version
1.0.11
1.0.10
1.0.9