{
  "_args": [
    [
      {
        "raw": "jwa@https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz",
        "scope": null,
        "escapedName": "jwa",
        "name": "jwa",
        "rawSpec": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz",
        "spec": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz",
        "type": "remote"
      },
      "E:\\MissionXJC\\XJC\\functions\\node_modules\\firebase-admin"
    ]
  ],
  "_from": "jwa@>=1.1.4 <2.0.0",
  "_id": "jwa@1.1.5",
  "_inCache": true,
  "_location": "/firebase-admin/jwa",
  "_phantomChildren": {},
  "_requested": {
    "raw": "jwa@https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz",
    "scope": null,
    "escapedName": "jwa",
    "name": "jwa",
    "rawSpec": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz",
    "spec": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz",
    "type": "remote"
  },
  "_requiredBy": [
    "/firebase-admin",
    "/firebase-admin/jws"
  ],
  "_resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz",
  "_shasum": "a0552ce0220742cd52e153774a32905c30e756e5",
  "_shrinkwrap": null,
  "_spec": "jwa@https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz",
  "_where": "E:\\MissionXJC\\XJC\\functions\\node_modules\\firebase-admin",
  "author": {
    "name": "Brian J. Brennan",
    "email": "brianloveswords@gmail.com"
  },
  "bugs": {
    "url": "https://github.com/brianloveswords/node-jwa/issues"
  },
  "dependencies": {
    "base64url": "2.0.0",
    "buffer-equal-constant-time": "1.0.1",
    "ecdsa-sig-formatter": "1.0.9",
    "safe-buffer": "^5.0.1"
  },
  "description": "JWA implementation (supports all JWS algorithms)",
  "devDependencies": {
    "semver": "4.3.6",
    "tap": "6.2.0"
  },
  "directories": {
    "test": "test"
  },
  "homepage": "https://github.com/brianloveswords/node-jwa#readme",
  "keywords": [
    "jwa",
    "jws",
    "jwt",
    "rsa",
    "ecdsa",
    "hmac"
  ],
  "license": "MIT",
  "main": "index.js",
  "name": "jwa",
  "optionalDependencies": {},
  "readme": "# node-jwa [![Build Status](https://travis-ci.org/brianloveswords/node-jwa.png?branch=master)](https://travis-ci.org/brianloveswords/node-jwa)\n\nA\n[JSON Web Algorithms](http://tools.ietf.org/id/draft-ietf-jose-json-web-algorithms-08.html)\nimplementation focusing (exclusively, at this point) on the algorithms necessary for\n[JSON Web Signatures](http://self-issued.info/docs/draft-ietf-jose-json-web-signature.html).\n\nThis library supports all of the required, recommended and optional cryptographic algorithms for JWS:\n\nalg Parameter Value | Digital Signature or MAC Algorithm\n----------------|----------------------------\nHS256 | HMAC using SHA-256 hash algorithm\nHS384 | HMAC using SHA-384 hash algorithm\nHS512 | HMAC using SHA-512 hash algorithm\nRS256 | RSASSA using SHA-256 hash algorithm\nRS384 | RSASSA using SHA-384 hash algorithm\nRS512 | RSASSA using SHA-512 hash algorithm\nES256 | ECDSA using P-256 curve and SHA-256 hash algorithm\nES384 | ECDSA using P-384 curve and SHA-384 hash algorithm\nES512 | ECDSA using P-521 curve and SHA-512 hash algorithm\nnone | No digital signature or MAC value included\n\n# Requirements\n\nIn order to run the tests, a recent version of OpenSSL is\nrequired. **The version that comes with OS X (OpenSSL 0.9.8r 8 Feb\n2011) is not recent enough**, as it does not fully support ECDSA\nkeys. You'll need to use a version > 1.0.0; I tested with OpenSSL 1.0.1c 10 May 2012.\n\n# Testing\n\nTo run the tests, do\n\n```bash\n$ npm test\n```\n\nThis will generate a bunch of keypairs to use in testing. If you want to\ngenerate new keypairs, do `make clean` before running `npm test` again.\n\n## Methodology\n\nI spawn `openssl dgst -sign` to test OpenSSL sign → JS verify and\n`openssl dgst -verify` to test JS sign → OpenSSL verify for each of the\nRSA and ECDSA algorithms.\n\n# Usage\n\n## jwa(algorithm)\n\nCreates a new `jwa` object with `sign` and `verify` methods for the\nalgorithm. Valid values for algorithm can be found in the table above\n(`'HS256'`, `'HS384'`, etc) and are case-insensitive. Passing an invalid\nalgorithm value will throw a `TypeError`.\n\n\n## jwa#sign(input, secretOrPrivateKey)\n\nSign some input with either a secret for HMAC algorithms, or a private\nkey for RSA and ECDSA algorithms.\n\nIf input is not already a string or buffer, `JSON.stringify` will be\ncalled on it to attempt to coerce it.\n\nFor the HMAC algorithm, `secretOrPrivateKey` should be a string or a\nbuffer. For ECDSA and RSA, the value should be a string representing a\nPEM encoded **private** key. \n\nOutput [base64url](http://en.wikipedia.org/wiki/Base64#URL_applications)\nformatted. This is for convenience as JWS expects the signature in this\nformat. If your application needs the output in a different format,\n[please open an issue](https://github.com/brianloveswords/node-jwa/issues). In\nthe meantime, you can use\n[brianloveswords/base64url](https://github.com/brianloveswords/base64url)\nto decode the signature.\n\nAs of nodejs *v0.11.8*, SPKAC support was introduce. If your nodeJs\nversion satisfies, then you can pass an object `{ key: '..', passphrase: '...' }`\n\n\n## jwa#verify(input, signature, secretOrPublicKey)\n\nVerify a signature. Returns `true` or `false`.\n\n`signature` should be a base64url encoded string.\n\nFor the HMAC algorithm, `secretOrPublicKey` should be a string or a\nbuffer. For ECDSA and RSA, the value should be a string represented a\nPEM encoded **public** key.\n\n\n# Example\n\nHMAC\n```js\nconst jwa = require('jwa');\n\nconst hmac = jwa('HS256');\nconst input = 'super important stuff';\nconst secret = 'shhhhhh';\n\nconst signature = hmac.sign(input, secret);\nhmac.verify(input, signature, secret) // === true\nhmac.verify(input, signature, 'trickery!') // === false\n```\n\nWith keys\n```js\nconst fs = require('fs');\nconst jwa = require('jwa');\nconst privateKey = fs.readFileSync(__dirname + '/ecdsa-p521-private.pem');\nconst publicKey = fs.readFileSync(__dirname + '/ecdsa-p521-public.pem');\n\nconst ecdsa = jwa('ES512');\nconst input = 'very important stuff';\n\nconst signature = ecdsa.sign(input, privateKey);\necdsa.verify(input, signature, publicKey) // === true\n```\n## License\n\nMIT\n\n```\nCopyright (c) 2013 Brian J. Brennan\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git://github.com/brianloveswords/node-jwa.git"
  },
  "scripts": {
    "test": "make test"
  },
  "version": "1.1.5"
}
