Maik d4ce39ca1a готовая форма авторизации | 3 лет назад | |
---|---|---|
.. | ||
src | 3 лет назад | |
CODEOWNERS | 3 лет назад | |
LICENSE | 3 лет назад | |
README.md | 3 лет назад | |
package.json | 3 лет назад |
Translate between JOSE and ASN.1/DER encodings for ECDSA signatures
npm install ecdsa-sig-formatter --save
var format = require('ecdsa-sig-formatter');
var derSignature = '..'; // asn.1/DER encoded ecdsa signature
var joseSignature = format.derToJose(derSignature);
.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
.
String
, it should be base64 encoded.joseToDer(Buffer|String signature, String alg)
-> Buffer
Convert the JOSE-style concatenated signature to an ASN.1/DER encoded
signature. Returns a Buffer
String
, it should be base64 url encodedFork the repository. Committing directly against this repository is highly discouraged.
Make your modifications in a branch, updating and writing new unit tests
as necessary in the spec
directory.
Ensure that all tests pass with npm test
rebase
your changes against master. Do not merge.
Submit a pull request to this repository. Wait for tests to run and someone to chime in.
This repository is configured with EditorConfig and ESLint rules.