GT2/GT2-Android/node_modules/jwa/package.json

112 lines
7.7 KiB
JSON
Raw Normal View History

{
"_args": [
[
{
"raw": "jwa@^1.1.4",
"scope": null,
"escapedName": "jwa",
"name": "jwa",
"rawSpec": "^1.1.4",
"spec": ">=1.1.4 <2.0.0",
"type": "range"
},
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/jws"
]
],
"_from": "jwa@>=1.1.4 <2.0.0",
"_id": "jwa@1.1.5",
"_inCache": true,
"_location": "/jwa",
"_nodeVersion": "6.9.1",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/jwa-1.1.5.tgz_1480972328527_0.010812546592205763"
},
"_npmUser": {
"name": "omsmith",
"email": "owen@omsmith.ca"
},
"_npmVersion": "3.10.8",
"_phantomChildren": {},
"_requested": {
"raw": "jwa@^1.1.4",
"scope": null,
"escapedName": "jwa",
"name": "jwa",
"rawSpec": "^1.1.4",
"spec": ">=1.1.4 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/jws"
],
"_resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz",
"_shasum": "a0552ce0220742cd52e153774a32905c30e756e5",
"_shrinkwrap": null,
"_spec": "jwa@^1.1.4",
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/jws",
"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"
},
"dist": {
"shasum": "a0552ce0220742cd52e153774a32905c30e756e5",
"tarball": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz"
},
"gitHead": "6b50153adc0b0a9b3fbebffb132f8d54178cd6af",
"homepage": "https://github.com/brianloveswords/node-jwa#readme",
"keywords": [
"jwa",
"jws",
"jwt",
"rsa",
"ecdsa",
"hmac"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "brianloveswords",
"email": "brianloveswords@gmail.com"
},
{
"name": "stenington",
"email": "mikelarssonftw@gmail.com"
},
{
"name": "omsmith",
"email": "owen@omsmith.ca"
}
],
"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
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/brianloveswords/node-jwa.git"
},
"scripts": {
"test": "make test"
},
"version": "1.1.5"
}