{"name":"ecdsa-sig-formatter","version":"1.0.9","description":"Translate ECDSA signatures between ASN.1/DER and JOSE-style concatenation","main":"src/ecdsa-sig-formatter.js","scripts":{"check-style":"eslint .","pretest":"npm run check-style","test":"istanbul cover --root src _mocha -- spec","report-cov":"cat ./coverage/lcov.info | coveralls"},"repository":{"type":"git","url":"git+ssh://git@github.com/Brightspace/node-ecdsa-sig-formatter.git"},"keywords":["ecdsa","der","asn.1","jwt","jwa","jsonwebtoken","jose"],"author":{"name":"D2L Corporation"},"license":"Apache-2.0","bugs":{"url":"https://github.com/Brightspace/node-ecdsa-sig-formatter/issues"},"homepage":"https://github.com/Brightspace/node-ecdsa-sig-formatter#readme","dependencies":{"base64url":"^2.0.0","safe-buffer":"^5.0.1"},"devDependencies":{"bench":"^0.3.6","chai":"^3.5.0","coveralls":"^2.11.9","elliptic":"^6.3.1","eslint":"^2.12.0","eslint-config-brightspace":"^0.2.1","istanbul":"^0.4.3","jwk-to-pem":"^1.2.5","mocha":"^2.5.3"},"gitHead":"e32ea222f0ffdde667d8e97588135953a4c34555","_id":"ecdsa-sig-formatter@1.0.9","_shasum":"4bc926274ec3b5abb5016e7e1d60921ac262b2a1","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.12.0","_npmUser":{"name":"d2l-travis-deploy","email":"d2ltravisdeploy@d2l.com"},"dist":{"shasum":"4bc926274ec3b5abb5016e7e1d60921ac262b2a1","tarball":"http://registry-npm.ywwl.com/ecdsa-sig-formatter/download/ecdsa-sig-formatter-1.0.9.tgz","integrity":"sha512-J/mTMRuaEY85fUpQmLRXBg3tOk1zshbIIazSoUzdpjdD7hdiYKR/VpiL6JNWbuSjbSYdugmgBv8m/O1kK0CQRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAwLNEN9wxCvdG7qfyU1uCb+D+a2zIUhiIM+s4p2ej/eAiBTSnzswi7qEEdEy4YXkJjuQVudzuzJVx4Dt6Vvp7CX+Q=="}],"size":6857,"noattachment":false,"key":"/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz"},"maintainers":[{"name":"d2l-travis-deploy","email":"d2ltravisdeploy@d2l.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ecdsa-sig-formatter-1.0.9.tgz_1480952424192_0.9221549024805427"},"directories":{},"readme":"# ecdsa-sig-formatter\n\n[![Build Status](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter.svg?branch=master)](https://travis-ci.org/Brightspace/node-ecdsa-sig-formatter) [![Coverage Status](https://coveralls.io/repos/Brightspace/node-ecdsa-sig-formatter/badge.svg)](https://coveralls.io/r/Brightspace/node-ecdsa-sig-formatter)\n\nTranslate between JOSE and ASN.1/DER encodings for ECDSA signatures\n\n## Install\n```sh\nnpm install ecdsa-sig-formatter --save\n```\n\n## Usage\n```js\nvar format = require('ecdsa-sig-formatter');\n\nvar derSignature = '..'; // asn.1/DER encoded ecdsa signature\n\nvar joseSignature = format.derToJose(derSignature);\n\n```\n\n### API\n\n---\n\n#### `.derToJose(Buffer|String signature, String alg)` -> `String`\n\nConvert the ASN.1/DER encoded signature to a JOSE-style concatenated signature.\nReturns a _base64 url_ encoded `String`.\n\n* If _signature_ is a `String`, it should be _base64_ encoded\n* _alg_ must be one of _ES256_, _ES384_ or _ES512_\n\n---\n\n#### `.joseToDer(Buffer|String signature, String alg)` -> `Buffer`\n\nConvert the JOSE-style concatenated signature to an ASN.1/DER encoded\nsignature. Returns a `Buffer`\n\n* If _signature_ is a `String`, it should be _base64 url_ encoded\n* _alg_ must be one of _ES256_, _ES384_ or _ES512_\n\n## Contributing\n\n1. **Fork** the repository. Committing directly against this repository is\n   highly discouraged.\n\n2. Make your modifications in a branch, updating and writing new unit tests\n   as necessary in the `spec` directory.\n\n3. Ensure that all tests pass with `npm test`\n\n4. `rebase` your changes against master. *Do not merge*.\n\n5. Submit a pull request to this repository. Wait for tests to run and someone\n   to chime in.\n\n### Code Style\n\nThis repository is configured with [EditorConfig][EditorConfig] and\n[ESLint][ESLint] rules.\n\n[EditorConfig]: http://editorconfig.org/\n[ESLint]: http://eslint.org\n","publish_time":1480952424823,"_cnpm_publish_time":1480952424823,"dist-tags":{"latest":"1.0.11"}}