aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/node_modules/http-signature
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/http-signature')
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md2
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json29
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md5
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md17
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js14
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/jsl.node.conf3
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json25
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md2
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema20
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref10
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links10
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema50
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema20
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref10
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links10
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema50
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema20
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref10
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links12
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema52
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar12
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces24
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref10
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links12
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema62
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links14
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema66
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml400
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml390
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js8
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js4
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json25
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/README.md18
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/jsl.node.conf3
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/package.json25
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json47
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/.travis.yml6
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md252
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv16
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign17
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/certificate.js291
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js28
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js35
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/auto.js16
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/openssh-cert.js289
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js44
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs1.js8
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js17
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/rfc4253.js4
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js6
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh.js4
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509-pem.js77
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509.js484
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/identity.js255
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js15
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js38
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/private-key.js31
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js20
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js24
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js41
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-conv.16
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/asn1/package.json33
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/AUTHORS (renamed from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/AUTHORS)0
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/CHANGES.md (renamed from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/CHANGES.md)0
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/README.md (renamed from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/README.md)0
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/assert.js (renamed from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/assert.js)0
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json (renamed from deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/package.json)67
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js35
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json53
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/index.js7
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/LICENSE-jsbn6
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/ec.js6
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json39
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.npmignore8
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.travis.yml9
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/LICENSE18
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/README.md32
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/lib/index.js123
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/package.json91
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/index.js8
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json37
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/LICENSE6
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/README.md4
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.html4
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json31
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md59
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt9
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md66
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js74
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js4
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js72
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js2
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json94
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json96
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/package.json21
95 files changed, 3478 insertions, 1151 deletions
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md b/deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md
index 3e4b13881e..6f69444ba6 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/CHANGES.md
@@ -27,7 +27,7 @@
- First semver release.
- #36: Ensure verifySignature does not leak useful timing information
-- #42: Bring the library up to the latest version of the spec (including the
+- #42: Bring the library up to the latest version of the spec (including the
request-target changes)
- Support for ECDSA keys and signatures.
- Now uses `sshpk` for key parsing, validation and conversion.
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
index b596b28af8..411084732a 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json
@@ -1,7 +1,15 @@
{
"_args": [
[
- "assert-plus@^0.2.0",
+ {
+ "raw": "assert-plus@^0.2.0",
+ "scope": null,
+ "escapedName": "assert-plus",
+ "name": "assert-plus",
+ "rawSpec": "^0.2.0",
+ "spec": ">=0.2.0 <0.3.0",
+ "type": "range"
+ },
"/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature"
]
],
@@ -12,23 +20,22 @@
"_location": "/request/http-signature/assert-plus",
"_nodeVersion": "0.10.36",
"_npmUser": {
- "email": "patrick.f.mooney@gmail.com",
- "name": "pfmooney"
+ "name": "pfmooney",
+ "email": "patrick.f.mooney@gmail.com"
},
"_npmVersion": "3.3.8",
"_phantomChildren": {},
"_requested": {
- "name": "assert-plus",
"raw": "assert-plus@^0.2.0",
- "rawSpec": "^0.2.0",
"scope": null,
+ "escapedName": "assert-plus",
+ "name": "assert-plus",
+ "rawSpec": "^0.2.0",
"spec": ">=0.2.0 <0.3.0",
"type": "range"
},
"_requiredBy": [
- "/request/http-signature",
- "/request/http-signature/sshpk",
- "/request/http-signature/sshpk/dashdash"
+ "/request/http-signature"
],
"_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
"_shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234",
@@ -36,8 +43,8 @@
"_spec": "assert-plus@^0.2.0",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature",
"author": {
- "email": "mcavage@gmail.com",
- "name": "Mark Cavage"
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
},
"bugs": {
"url": "https://github.com/mcavage/node-assert-plus/issues"
@@ -77,7 +84,7 @@
"directories": {},
"dist": {
"shasum": "d74e1b87e7affc0db8aadb7021f3fe48101ab234",
- "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz"
+ "tarball": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz"
},
"engines": {
"node": ">=0.8"
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md
index 75bc4f025c..ab3a66417a 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CHANGES.md
@@ -4,6 +4,11 @@
None yet.
+## v1.3.0 (2016-06-22)
+
+* #14 add safer version of hasOwnProperty()
+* #15 forEachKey() should ignore inherited properties
+
## v1.2.2 (2015-10-15)
* #11 NPM package shouldn't include any code that does `require('JSV')`
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
index b502b2d3a4..7303642e01 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
@@ -19,14 +19,23 @@ Returns whether two objects are equal.
Returns true if the given object has no properties and false otherwise. This
is O(1) (unlike `Object.keys(obj).length === 0`, which is O(N)).
+### hasKey(obj, key)
+
+Returns true if the given object has an enumerable, non-inherited property
+called `key`. [For information on enumerability and ownership of properties, see
+the MDN
+documentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties)
### forEachKey(obj, callback)
-Like Array.forEach, but iterates properties of an object rather than elements
-of an array. Equivalent to:
+Like Array.forEach, but iterates enumerable, owned properties of an object
+rather than elements of an array. Equivalent to:
- for (var key in obj)
- callback(key, obj[key]);
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ callback(key, obj[key]);
+ }
+ }
### flattenObject(obj, depth)
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js
index 5ee4688922..26c3ba1c07 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/lib/jsprim.js
@@ -15,6 +15,7 @@ var mod_jsonschema = require('json-schema');
exports.deepCopy = deepCopy;
exports.deepEqual = deepEqual;
exports.isEmpty = isEmpty;
+exports.hasKey = hasKey;
exports.forEachKey = forEachKey;
exports.pluck = pluck;
exports.flattenObject = flattenObject;
@@ -122,10 +123,19 @@ function isEmpty(obj)
return (true);
}
+function hasKey(obj, key)
+{
+ mod_assert.equal(typeof (key), 'string');
+ return (Object.prototype.hasOwnProperty.call(obj, key));
+}
+
function forEachKey(obj, callback)
{
- for (var key in obj)
- callback(key, obj[key]);
+ for (var key in obj) {
+ if (hasKey(obj, key)) {
+ callback(key, obj[key]);
+ }
+ }
}
function pluck(obj, key)
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/jsl.node.conf b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/jsl.node.conf
index eabe9650f5..03f787ffbd 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/jsl.node.conf
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/jsl.node.conf
@@ -1,5 +1,5 @@
#
-# Configuration File for JavaScript Lint
+# Configuration File for JavaScript Lint
#
# This configuration file can be used to lint a collection of scripts, or to enable
# or disable warnings for scripts that are linted via the command line.
@@ -134,3 +134,4 @@
# To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
# or "+process Folder\Path\*.htm".
#
+
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json
index 660308afc6..2fd7273a90 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/package.json
@@ -1,8 +1,16 @@
{
"_args": [
[
- "extsprintf@1.0.2",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim"
+ {
+ "raw": "extsprintf@1.0.2",
+ "scope": null,
+ "escapedName": "extsprintf",
+ "name": "extsprintf",
+ "rawSpec": "1.0.2",
+ "spec": "1.0.2",
+ "type": "version"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim"
]
],
"_from": "extsprintf@1.0.2",
@@ -11,16 +19,17 @@
"_installable": true,
"_location": "/request/http-signature/jsprim/extsprintf",
"_npmUser": {
- "email": "dap@cs.brown.edu",
- "name": "dap"
+ "name": "dap",
+ "email": "dap@cs.brown.edu"
},
"_npmVersion": "1.1.65",
"_phantomChildren": {},
"_requested": {
- "name": "extsprintf",
"raw": "extsprintf@1.0.2",
- "rawSpec": "1.0.2",
"scope": null,
+ "escapedName": "extsprintf",
+ "name": "extsprintf",
+ "rawSpec": "1.0.2",
"spec": "1.0.2",
"type": "version"
},
@@ -32,7 +41,7 @@
"_shasum": "e1080e0658e300b06294990cc70e1502235fd550",
"_shrinkwrap": null,
"_spec": "extsprintf@1.0.2",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim",
"bugs": {
"url": "https://github.com/davepacheco/node-extsprintf/issues"
},
@@ -42,7 +51,7 @@
"directories": {},
"dist": {
"shasum": "e1080e0658e300b06294990cc70e1502235fd550",
- "tarball": "http://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz"
+ "tarball": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.0.2.tgz"
},
"engines": [
"node >=0.6.0"
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md
index 78b81d3968..4de0124476 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/README.md
@@ -1,5 +1,5 @@
JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator).
-Code is licensed under the AFL or BSD license as part of the Persevere
+Code is licensed under the AFL or BSD license as part of the Persevere
project which is administered under the Dojo foundation,
and all contributions require a Dojo CLA. \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema
index 36a85ccd24..de80b918b6 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/hyper-schema
@@ -8,61 +8,61 @@
"items" : {"$ref" : "http://json-schema.org/draft-00/links#"},
"optional" : true
},
-
+
"fragmentResolution" : {
"type" : "string",
"optional" : true,
"default" : "dot-delimited"
},
-
+
"root" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"readonly" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"pathStart" : {
"type" : "string",
"optional" : true,
"format" : "uri"
},
-
+
"mediaType" : {
"type" : "string",
"optional" : true,
"format" : "media-type"
},
-
+
"alternate" : {
"type" : "array",
"items" : {"$ref" : "#"},
"optional" : true
}
},
-
+
"links" : [
{
"href" : "{$ref}",
"rel" : "full"
},
-
+
{
"href" : "{$schema}",
"rel" : "describedby"
},
-
+
{
"href" : "{id}",
"rel" : "self"
}
],
-
+
"fragmentResolution" : "dot-delimited",
"extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"}
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref
index 5d1f76b6a6..3a872a71c9 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/json-ref
@@ -1,26 +1,26 @@
{
"$schema" : "http://json-schema.org/draft-00/hyper-schema#",
"id" : "http://json-schema.org/draft-00/json-ref#",
-
+
"items" : {"$ref" : "#"},
"additionalProperties" : {"$ref" : "#"},
-
+
"links" : [
{
"href" : "{$ref}",
"rel" : "full"
},
-
+
{
"href" : "{$schema}",
"rel" : "describedby"
},
-
+
{
"href" : "{id}",
"rel" : "self"
}
],
-
+
"fragmentResolution" : "dot-delimited"
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links
index cbef326dd3..8a5e780725 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/links
@@ -2,28 +2,28 @@
"$schema" : "http://json-schema.org/draft-00/hyper-schema#",
"id" : "http://json-schema.org/draft-00/links#",
"type" : "object",
-
+
"properties" : {
"href" : {
"type" : "string"
},
-
+
"rel" : {
"type" : "string"
},
-
+
"method" : {
"type" : "string",
"default" : "GET",
"optional" : true
},
-
+
"enctype" : {
"type" : "string",
"requires" : "method",
"optional" : true
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"},
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema
index d452b023ee..9aa2fbc57a 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-00/schema
@@ -2,7 +2,7 @@
"$schema" : "http://json-schema.org/draft-00/hyper-schema#",
"id" : "http://json-schema.org/draft-00/schema#",
"type" : "object",
-
+
"properties" : {
"type" : {
"type" : ["string", "array"],
@@ -12,136 +12,136 @@
"optional" : true,
"default" : "any"
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#"},
"optional" : true,
"default" : {}
},
-
+
"items" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
"optional" : true,
"default" : {}
},
-
+
"optional" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"additionalProperties" : {
"type" : [{"$ref" : "#"}, "boolean"],
"optional" : true,
"default" : {}
},
-
+
"requires" : {
"type" : ["string", {"$ref" : "#"}],
"optional" : true
},
-
+
"minimum" : {
"type" : "number",
"optional" : true
},
-
+
"maximum" : {
"type" : "number",
"optional" : true
},
-
+
"minimumCanEqual" : {
"type" : "boolean",
"optional" : true,
"requires" : "minimum",
"default" : true
},
-
+
"maximumCanEqual" : {
"type" : "boolean",
"optional" : true,
"requires" : "maximum",
"default" : true
},
-
+
"minItems" : {
"type" : "integer",
"optional" : true,
"minimum" : 0,
"default" : 0
},
-
+
"maxItems" : {
"type" : "integer",
"optional" : true,
"minimum" : 0
},
-
+
"pattern" : {
"type" : "string",
"optional" : true,
"format" : "regex"
},
-
+
"minLength" : {
"type" : "integer",
"optional" : true,
"minimum" : 0,
"default" : 0
},
-
+
"maxLength" : {
"type" : "integer",
"optional" : true
},
-
+
"enum" : {
"type" : "array",
"optional" : true,
"minItems" : 1
},
-
+
"title" : {
"type" : "string",
"optional" : true
},
-
+
"description" : {
"type" : "string",
"optional" : true
},
-
+
"format" : {
"type" : "string",
"optional" : true
},
-
+
"contentEncoding" : {
"type" : "string",
"optional" : true
},
-
+
"default" : {
"type" : "any",
"optional" : true
},
-
+
"maxDecimal" : {
"type" : "integer",
"optional" : true,
"minimum" : 0
},
-
+
"disallow" : {
"type" : ["string", "array"],
"items" : {"type" : "string"},
"optional" : true
},
-
+
"extends" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
@@ -149,7 +149,7 @@
"default" : {}
}
},
-
+
"optional" : true,
"default" : {}
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema
index b0fb5e157e..3f6c6cc2c0 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/hyper-schema
@@ -8,61 +8,61 @@
"items" : {"$ref" : "http://json-schema.org/draft-01/links#"},
"optional" : true
},
-
+
"fragmentResolution" : {
"type" : "string",
"optional" : true,
"default" : "dot-delimited"
},
-
+
"root" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"readonly" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"pathStart" : {
"type" : "string",
"optional" : true,
"format" : "uri"
},
-
+
"mediaType" : {
"type" : "string",
"optional" : true,
"format" : "media-type"
},
-
+
"alternate" : {
"type" : "array",
"items" : {"$ref" : "#"},
"optional" : true
}
},
-
+
"links" : [
{
"href" : "{$ref}",
"rel" : "full"
},
-
+
{
"href" : "{$schema}",
"rel" : "describedby"
},
-
+
{
"href" : "{id}",
"rel" : "self"
}
],
-
+
"fragmentResolution" : "dot-delimited",
"extends" : {"$ref" : "http://json-schema.org/draft-01/schema#"}
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref
index cbac1ba2e5..4d26174ef1 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/json-ref
@@ -1,26 +1,26 @@
{
"$schema" : "http://json-schema.org/draft-01/hyper-schema#",
"id" : "http://json-schema.org/draft-01/json-ref#",
-
+
"items" : {"$ref" : "#"},
"additionalProperties" : {"$ref" : "#"},
-
+
"links" : [
{
"href" : "{$ref}",
"rel" : "full"
},
-
+
{
"href" : "{$schema}",
"rel" : "describedby"
},
-
+
{
"href" : "{id}",
"rel" : "self"
}
],
-
+
"fragmentResolution" : "dot-delimited"
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links
index ebc7b7b58b..52430a5d94 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/links
@@ -2,28 +2,28 @@
"$schema" : "http://json-schema.org/draft-01/hyper-schema#",
"id" : "http://json-schema.org/draft-01/links#",
"type" : "object",
-
+
"properties" : {
"href" : {
"type" : "string"
},
-
+
"rel" : {
"type" : "string"
},
-
+
"method" : {
"type" : "string",
"default" : "GET",
"optional" : true
},
-
+
"enctype" : {
"type" : "string",
"requires" : "method",
"optional" : true
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"},
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema
index a0f3801f84..7a208e680e 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-01/schema
@@ -2,7 +2,7 @@
"$schema" : "http://json-schema.org/draft-01/hyper-schema#",
"id" : "http://json-schema.org/draft-01/schema#",
"type" : "object",
-
+
"properties" : {
"type" : {
"type" : ["string", "array"],
@@ -12,136 +12,136 @@
"optional" : true,
"default" : "any"
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#"},
"optional" : true,
"default" : {}
},
-
+
"items" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
"optional" : true,
"default" : {}
},
-
+
"optional" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"additionalProperties" : {
"type" : [{"$ref" : "#"}, "boolean"],
"optional" : true,
"default" : {}
},
-
+
"requires" : {
"type" : ["string", {"$ref" : "#"}],
"optional" : true
},
-
+
"minimum" : {
"type" : "number",
"optional" : true
},
-
+
"maximum" : {
"type" : "number",
"optional" : true
},
-
+
"minimumCanEqual" : {
"type" : "boolean",
"optional" : true,
"requires" : "minimum",
"default" : true
},
-
+
"maximumCanEqual" : {
"type" : "boolean",
"optional" : true,
"requires" : "maximum",
"default" : true
},
-
+
"minItems" : {
"type" : "integer",
"optional" : true,
"minimum" : 0,
"default" : 0
},
-
+
"maxItems" : {
"type" : "integer",
"optional" : true,
"minimum" : 0
},
-
+
"pattern" : {
"type" : "string",
"optional" : true,
"format" : "regex"
},
-
+
"minLength" : {
"type" : "integer",
"optional" : true,
"minimum" : 0,
"default" : 0
},
-
+
"maxLength" : {
"type" : "integer",
"optional" : true
},
-
+
"enum" : {
"type" : "array",
"optional" : true,
"minItems" : 1
},
-
+
"title" : {
"type" : "string",
"optional" : true
},
-
+
"description" : {
"type" : "string",
"optional" : true
},
-
+
"format" : {
"type" : "string",
"optional" : true
},
-
+
"contentEncoding" : {
"type" : "string",
"optional" : true
},
-
+
"default" : {
"type" : "any",
"optional" : true
},
-
+
"maxDecimal" : {
"type" : "integer",
"optional" : true,
"minimum" : 0
},
-
+
"disallow" : {
"type" : ["string", "array"],
"items" : {"type" : "string"},
"optional" : true
},
-
+
"extends" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
@@ -149,7 +149,7 @@
"default" : {}
}
},
-
+
"optional" : true,
"default" : {}
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema
index 0771e2b31e..4ec1b75691 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/hyper-schema
@@ -8,61 +8,61 @@
"items" : {"$ref" : "http://json-schema.org/draft-02/links#"},
"optional" : true
},
-
+
"fragmentResolution" : {
"type" : "string",
"optional" : true,
"default" : "slash-delimited"
},
-
+
"root" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"readonly" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"pathStart" : {
"type" : "string",
"optional" : true,
"format" : "uri"
},
-
+
"mediaType" : {
"type" : "string",
"optional" : true,
"format" : "media-type"
},
-
+
"alternate" : {
"type" : "array",
"items" : {"$ref" : "#"},
"optional" : true
}
},
-
+
"links" : [
{
"href" : "{$ref}",
"rel" : "full"
},
-
+
{
"href" : "{$schema}",
"rel" : "describedby"
},
-
+
{
"href" : "{id}",
"rel" : "self"
}
],
-
+
"fragmentResolution" : "slash-delimited",
"extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"}
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref
index 1a6c56d04b..6526c39455 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/json-ref
@@ -1,26 +1,26 @@
{
"$schema" : "http://json-schema.org/draft-02/hyper-schema#",
"id" : "http://json-schema.org/draft-02/json-ref#",
-
+
"items" : {"$ref" : "#"},
"additionalProperties" : {"$ref" : "#"},
-
+
"links" : [
{
"href" : "{$ref}",
"rel" : "full"
},
-
+
{
"href" : "{$schema}",
"rel" : "describedby"
},
-
+
{
"href" : "{id}",
"rel" : "self"
}
],
-
+
"fragmentResolution" : "dot-delimited"
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links
index dacc53a1a4..1b176178a2 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/links
@@ -2,30 +2,30 @@
"$schema" : "http://json-schema.org/draft-02/hyper-schema#",
"id" : "http://json-schema.org/draft-02/links#",
"type" : "object",
-
+
"properties" : {
"href" : {
"type" : "string"
},
-
+
"rel" : {
"type" : "string"
},
-
+
"targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"},
-
+
"method" : {
"type" : "string",
"default" : "GET",
"optional" : true
},
-
+
"enctype" : {
"type" : "string",
"requires" : "method",
"optional" : true
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"},
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema
index a4998abea2..61b8de1548 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-02/schema
@@ -2,7 +2,7 @@
"$schema" : "http://json-schema.org/draft-02/hyper-schema#",
"id" : "http://json-schema.org/draft-02/schema#",
"type" : "object",
-
+
"properties" : {
"type" : {
"type" : ["string", "array"],
@@ -13,131 +13,131 @@
"uniqueItems" : true,
"default" : "any"
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#"},
"optional" : true,
"default" : {}
},
-
+
"items" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
"optional" : true,
"default" : {}
},
-
+
"optional" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"additionalProperties" : {
"type" : [{"$ref" : "#"}, "boolean"],
"optional" : true,
"default" : {}
},
-
+
"requires" : {
"type" : ["string", {"$ref" : "#"}],
"optional" : true
},
-
+
"minimum" : {
"type" : "number",
"optional" : true
},
-
+
"maximum" : {
"type" : "number",
"optional" : true
},
-
+
"minimumCanEqual" : {
"type" : "boolean",
"optional" : true,
"requires" : "minimum",
"default" : true
},
-
+
"maximumCanEqual" : {
"type" : "boolean",
"optional" : true,
"requires" : "maximum",
"default" : true
},
-
+
"minItems" : {
"type" : "integer",
"optional" : true,
"minimum" : 0,
"default" : 0
},
-
+
"maxItems" : {
"type" : "integer",
"optional" : true,
"minimum" : 0
},
-
+
"uniqueItems" : {
"type" : "boolean",
"optional" : true,
"default" : false
},
-
+
"pattern" : {
"type" : "string",
"optional" : true,
"format" : "regex"
},
-
+
"minLength" : {
"type" : "integer",
"optional" : true,
"minimum" : 0,
"default" : 0
},
-
+
"maxLength" : {
"type" : "integer",
"optional" : true
},
-
+
"enum" : {
"type" : "array",
"optional" : true,
"minItems" : 1,
"uniqueItems" : true
},
-
+
"title" : {
"type" : "string",
"optional" : true
},
-
+
"description" : {
"type" : "string",
"optional" : true
},
-
+
"format" : {
"type" : "string",
"optional" : true
},
-
+
"contentEncoding" : {
"type" : "string",
"optional" : true
},
-
+
"default" : {
"type" : "any",
"optional" : true
},
-
+
"divisibleBy" : {
"type" : "number",
"minimum" : 0,
@@ -145,14 +145,14 @@
"optional" : true,
"default" : 1
},
-
+
"disallow" : {
"type" : ["string", "array"],
"items" : {"type" : "string"},
"optional" : true,
"uniqueItems" : true
},
-
+
"extends" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
@@ -160,7 +160,7 @@
"default" : {}
}
},
-
+
"optional" : true,
"default" : {}
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar
index d8fb5335f0..463cfb314b 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/calendar
@@ -12,12 +12,12 @@
"type":"string",
"required":true
},
- "location" : {
- "type" : "string"
+ "location" : {
+ "type" : "string"
},
"url" : {
- "type" : "string",
- "format" : "url"
+ "type" : "string",
+ "format" : "url"
},
"dtend" : {
"format" : "date-time",
@@ -47,3 +47,7 @@
"geo" : { "$ref" : "http://json-schema.org/draft-03/geo" }
}
}
+
+
+
+
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces
index 84ebf83a99..288a19856b 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/examples/interfaces
@@ -6,18 +6,18 @@
"type":"object",
"description":"This defines the set of methods available to the class instances",
"additionalProperties":{
- "type":"object",
- "description":"The definition of the method",
- "properties":{
- "parameters":{
- "type":"array",
- "description":"The set of parameters that should be passed to the method when it is called",
- "items":{"$ref":"#"},
- "required": true
- },
- "returns":{"$ref":"#"}
- }
+ "type":"object",
+ "description":"The definition of the method",
+ "properties":{
+ "parameters":{
+ "type":"array",
+ "description":"The set of parameters that should be passed to the method when it is called",
+ "items":{"$ref":"#"},
+ "required": true
+ },
+ "returns":{"$ref":"#"}
+ }
}
- }
+ }
}
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref
index 388476323a..7e491a8e88 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/json-ref
@@ -1,26 +1,26 @@
{
"$schema" : "http://json-schema.org/draft-03/hyper-schema#",
"id" : "http://json-schema.org/draft-03/json-ref#",
-
+
"additionalItems" : {"$ref" : "#"},
"additionalProperties" : {"$ref" : "#"},
-
+
"links" : [
{
"href" : "{id}",
"rel" : "self"
},
-
+
{
"href" : "{$ref}",
"rel" : "full"
},
-
+
{
"href" : "{$schema}",
"rel" : "describedby"
}
],
-
+
"fragmentResolution" : "dot-delimited"
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links
index 3dbcdba73c..6b0a85a629 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/links
@@ -2,31 +2,31 @@
"$schema" : "http://json-schema.org/draft-03/hyper-schema#",
"id" : "http://json-schema.org/draft-03/links#",
"type" : "object",
-
+
"properties" : {
"href" : {
"type" : "string",
"required" : true,
"format" : "link-description-object-template"
},
-
+
"rel" : {
"type" : "string",
"required" : true
},
-
+
"targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"},
-
+
"method" : {
"type" : "string",
"default" : "GET"
},
-
+
"enctype" : {
"type" : "string",
"requires" : "method"
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema
index 361456d8a7..55ae47d808 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-03/schema
@@ -2,7 +2,7 @@
"$schema" : "http://json-schema.org/draft-03/schema#",
"id" : "http://json-schema.org/draft-03/schema#",
"type" : "object",
-
+
"properties" : {
"type" : {
"type" : ["string", "array"],
@@ -12,40 +12,40 @@
"uniqueItems" : true,
"default" : "any"
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#"},
"default" : {}
},
-
+
"patternProperties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#"},
"default" : {}
},
-
+
"additionalProperties" : {
"type" : [{"$ref" : "#"}, "boolean"],
"default" : {}
},
-
+
"items" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
"default" : {}
},
-
+
"additionalItems" : {
"type" : [{"$ref" : "#"}, "boolean"],
"default" : {}
},
-
+
"required" : {
"type" : "boolean",
"default" : false
},
-
+
"dependencies" : {
"type" : "object",
"additionalProperties" : {
@@ -56,85 +56,85 @@
},
"default" : {}
},
-
+
"minimum" : {
"type" : "number"
},
-
+
"maximum" : {
"type" : "number"
},
-
+
"exclusiveMinimum" : {
"type" : "boolean",
"default" : false
},
-
+
"exclusiveMaximum" : {
"type" : "boolean",
"default" : false
},
-
+
"minItems" : {
"type" : "integer",
"minimum" : 0,
"default" : 0
},
-
+
"maxItems" : {
"type" : "integer",
"minimum" : 0
},
-
+
"uniqueItems" : {
"type" : "boolean",
"default" : false
},
-
+
"pattern" : {
"type" : "string",
"format" : "regex"
},
-
+
"minLength" : {
"type" : "integer",
"minimum" : 0,
"default" : 0
},
-
+
"maxLength" : {
"type" : "integer"
},
-
+
"enum" : {
"type" : "array",
"minItems" : 1,
"uniqueItems" : true
},
-
+
"default" : {
"type" : "any"
},
-
+
"title" : {
"type" : "string"
},
-
+
"description" : {
"type" : "string"
},
-
+
"format" : {
"type" : "string"
},
-
+
"divisibleBy" : {
"type" : "number",
"minimum" : 0,
"exclusiveMinimum" : true,
"default" : 1
},
-
+
"disallow" : {
"type" : ["string", "array"],
"items" : {
@@ -142,33 +142,33 @@
},
"uniqueItems" : true
},
-
+
"extends" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
"default" : {}
},
-
+
"id" : {
"type" : "string",
"format" : "uri"
},
-
+
"$ref" : {
"type" : "string",
"format" : "uri"
},
-
+
"$schema" : {
"type" : "string",
"format" : "uri"
}
},
-
+
"dependencies" : {
"exclusiveMinimum" : "minimum",
"exclusiveMaximum" : "maximum"
},
-
+
"default" : {}
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links
index 7cf7c92c20..de272cc451 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/links
@@ -2,7 +2,7 @@
"$schema" : "http://json-schema.org/draft-04/hyper-schema#",
"id" : "http://json-schema.org/draft-04/links#",
"type" : "object",
-
+
"properties" : {
"rel" : {
"type" : "string"
@@ -15,26 +15,26 @@
"template" : {
"type" : "string"
},
-
+
"targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"},
-
+
"method" : {
"type" : "string",
"default" : "GET"
},
-
+
"enctype" : {
"type" : "string"
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}
}
},
-
+
"required" : ["rel", "href"],
-
+
"dependencies" : {
"enctype" : "method"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema
index e9c90699fd..598951e57d 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-04/schema
@@ -2,7 +2,7 @@
"$schema" : "http://json-schema.org/draft-04/schema#",
"id" : "http://json-schema.org/draft-04/schema#",
"type" : "object",
-
+
"properties" : {
"type" : {
"type" : [
@@ -10,19 +10,19 @@
"id" : "#simple-type",
"type" : "string",
"enum" : ["object", "array", "string", "number", "boolean", "null", "any"]
- },
+ },
"array"
],
"items" : {
"type" : [
- {"$ref" : "#simple-type"},
+ {"$ref" : "#simple-type"},
{"$ref" : "#"}
]
},
"uniqueItems" : true,
"default" : "any"
},
-
+
"disallow" : {
"type" : ["string", "array"],
"items" : {
@@ -30,7 +30,7 @@
},
"uniqueItems" : true
},
-
+
"extends" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
@@ -42,108 +42,108 @@
"minItems" : 1,
"uniqueItems" : true
},
-
+
"minimum" : {
"type" : "number"
},
-
+
"maximum" : {
"type" : "number"
},
-
+
"exclusiveMinimum" : {
"type" : "boolean",
"default" : false
},
-
+
"exclusiveMaximum" : {
"type" : "boolean",
"default" : false
},
-
+
"divisibleBy" : {
"type" : "number",
"minimum" : 0,
"exclusiveMinimum" : true,
"default" : 1
},
-
+
"minLength" : {
"type" : "integer",
"minimum" : 0,
"default" : 0
},
-
+
"maxLength" : {
"type" : "integer"
},
-
+
"pattern" : {
"type" : "string"
},
-
+
"items" : {
"type" : [{"$ref" : "#"}, "array"],
"items" : {"$ref" : "#"},
"default" : {}
},
-
+
"additionalItems" : {
"type" : [{"$ref" : "#"}, "boolean"],
"default" : {}
},
-
+
"minItems" : {
"type" : "integer",
"minimum" : 0,
"default" : 0
},
-
+
"maxItems" : {
"type" : "integer",
"minimum" : 0
},
-
+
"uniqueItems" : {
"type" : "boolean",
"default" : false
},
-
+
"properties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#"},
"default" : {}
},
-
+
"patternProperties" : {
"type" : "object",
"additionalProperties" : {"$ref" : "#"},
"default" : {}
},
-
+
"additionalProperties" : {
"type" : [{"$ref" : "#"}, "boolean"],
"default" : {}
},
-
+
"minProperties" : {
"type" : "integer",
"minimum" : 0,
"default" : 0
},
-
+
"maxProperties" : {
"type" : "integer",
"minimum" : 0
},
-
+
"required" : {
"type" : "array",
"items" : {
"type" : "string"
}
},
-
+
"dependencies" : {
"type" : "object",
"additionalProperties" : {
@@ -154,36 +154,36 @@
},
"default" : {}
},
-
+
"id" : {
"type" : "string"
},
-
+
"$ref" : {
"type" : "string"
},
-
+
"$schema" : {
"type" : "string"
},
-
+
"title" : {
"type" : "string"
},
-
+
"description" : {
"type" : "string"
},
-
+
"default" : {
"type" : "any"
}
},
-
+
"dependencies" : {
"exclusiveMinimum" : "minimum",
"exclusiveMaximum" : "maximum"
},
-
+
"default" : {}
} \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml
index 1cf715910b..c28f40dcd6 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-03.xml
@@ -24,7 +24,7 @@
<rfc category="info" docName="draft-zyp-json-schema-03" ipr="trust200902">
<front>
<title abbrev="JSON Schema Media Type">A JSON Media Type for Describing the Structure and Meaning of JSON Documents</title>
-
+
<author fullname="Kris Zyp" initials="K" role="editor" surname="Zyp">
<organization>SitePen (USA)</organization>
<address>
@@ -37,7 +37,7 @@
<email>kris@sitepen.com</email>
</address>
</author>
-
+
<author fullname="Gary Court" initials="G" surname="Court">
<address>
<postal>
@@ -48,7 +48,7 @@
<email>gary.court@gmail.com</email>
</address>
</author>
-
+
<date year="2011" />
<workgroup>Internet Engineering Task Force</workgroup>
<keyword>JSON</keyword>
@@ -58,59 +58,59 @@
<keyword>Notation</keyword>
<keyword>Hyper Schema</keyword>
<keyword>Hypermedia</keyword>
-
+
<abstract>
<t>
- JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json",
- a JSON based format for defining
- the structure of JSON data. JSON Schema provides a contract for what JSON
- data is required for a given application and how to interact with it. JSON
- Schema is intended to define validation, documentation, hyperlink
- navigation, and interaction control of JSON data.
+ JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json",
+ a JSON based format for defining
+ the structure of JSON data. JSON Schema provides a contract for what JSON
+ data is required for a given application and how to interact with it. JSON
+ Schema is intended to define validation, documentation, hyperlink
+ navigation, and interaction control of JSON data.
</t>
</abstract>
</front>
-
+
<middle>
<section title="Introduction">
<t>
- JSON (JavaScript Object Notation) Schema is a JSON media type for defining
- the structure of JSON data. JSON Schema provides a contract for what JSON
- data is required for a given application and how to interact with it. JSON
- Schema is intended to define validation, documentation, hyperlink
- navigation, and interaction control of JSON data.
+ JSON (JavaScript Object Notation) Schema is a JSON media type for defining
+ the structure of JSON data. JSON Schema provides a contract for what JSON
+ data is required for a given application and how to interact with it. JSON
+ Schema is intended to define validation, documentation, hyperlink
+ navigation, and interaction control of JSON data.
</t>
</section>
-
+
<section title="Conventions">
<t>
- <!-- The text in this section has been copied from the official boilerplate,
+ <!-- The text in this section has been copied from the official boilerplate,
and should not be modified.-->
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in <xref target="RFC2119">RFC 2119</xref>.
</t>
</section>
-
+
<!-- ********************************************* -->
-
+
<section title="Overview">
<t>
- JSON Schema defines the media type "application/schema+json" for
+ JSON Schema defines the media type "application/schema+json" for
describing the structure of other
- JSON documents. JSON Schema is JSON-based and includes facilities
+ JSON documents. JSON Schema is JSON-based and includes facilities
for describing the structure of JSON documents in terms of
allowable values, descriptions, and interpreting relations with other resources.
</t>
<t>
- JSON Schema format is organized into several separate definitions. The first
- definition is the core schema specification. This definition is primary
+ JSON Schema format is organized into several separate definitions. The first
+ definition is the core schema specification. This definition is primary
concerned with describing a JSON structure and specifying valid elements
in the structure. The second definition is the Hyper Schema specification
which is intended define elements in a structure that can be interpreted as
hyperlinks.
- Hyper Schema builds on JSON Schema to describe the hyperlink structure of
+ Hyper Schema builds on JSON Schema to describe the hyperlink structure of
other JSON documents and elements of interaction. This allows user agents to be able to successfully navigate
JSON documents based on their schemas.
</t>
@@ -118,12 +118,12 @@
Cumulatively JSON Schema acts as a meta-document that can be used to define the required type and constraints on
property values, as well as define the meaning of the property values
for the purpose of describing a resource and determining hyperlinks
- within the representation.
+ within the representation.
</t>
<figure>
<preamble>An example JSON Schema that describes products might look like:</preamble>
<artwork>
-<![CDATA[
+<![CDATA[
{
"title": "Product",
"properties": {
@@ -161,21 +161,21 @@
]]>
</artwork>
<postamble>
- This schema defines the properties of the instance JSON documents,
+ This schema defines the properties of the instance JSON documents,
the required properties (id, name, and price), as well as an optional
property (tags). This also defines the link relations of the instance
JSON documents.
</postamble>
</figure>
-
+
<section title="Terminology">
<t>
- For this specification, <spanx style="strong">schema</spanx> will be used to denote a JSON Schema
- definition, and an <spanx style="strong">instance</spanx> refers to a JSON value that the schema
+ For this specification, <spanx style="strong">schema</spanx> will be used to denote a JSON Schema
+ definition, and an <spanx style="strong">instance</spanx> refers to a JSON value that the schema
will be describing and validating.
</t>
</section>
-
+
<section title="Design Considerations">
<t>
The JSON Schema media type does not attempt to dictate the structure of JSON
@@ -194,7 +194,7 @@
This specification is protocol agnostic.
The underlying protocol (such as HTTP) should sufficiently define the
semantics of the client-server interface, the retrieval of resource
- representations linked to by JSON representations, and modification of
+ representations linked to by JSON representations, and modification of
those resources. The goal of this
format is to sufficiently describe JSON structures such that one can
utilize existing information available in existing JSON
@@ -203,7 +203,7 @@
</t>
</section>
</section>
-
+
<section title="Schema/Instance Association">
<t>
JSON Schema instances are correlated to their schema by the "describedby"
@@ -217,22 +217,22 @@
representation and messages may retain the self-descriptive
characteristic, avoiding the need for out-of-band information about
instance data. Two approaches are recommended for declaring the
- relation to the schema that describes the meaning of a JSON instance's (or collection
+ relation to the schema that describes the meaning of a JSON instance's (or collection
of instances) structure. A MIME type parameter named
"profile" or a relation of "describedby" (which could be defined by a Link header) may be used:
-
+
<figure>
<artwork>
-<![CDATA[
+<![CDATA[
Content-Type: application/my-media-type+json;
profile=http://json.com/my-hyper-schema
]]>
</artwork>
</figure>
-
+
or if the content is being transferred by a protocol (such as HTTP) that
provides headers, a Link header can be used:
-
+
<figure>
<artwork>
<![CDATA[
@@ -240,36 +240,36 @@ Link: <http://json.com/my-hyper-schema>; rel="describedby"
]]>
</artwork>
</figure>
-
- Instances MAY specify multiple schemas, to indicate all the schemas that
- are applicable to the data, and the data SHOULD be valid by all the schemas.
- The instance data MAY have multiple schemas
- that it is defined by (the instance data SHOULD be valid for those schemas).
- Or if the document is a collection of instances, the collection MAY contain
- instances from different schemas. When collections contain heterogeneous
- instances, the "pathStart" attribute MAY be specified in the
- schema to disambiguate which schema should be applied for each item in the
+
+ Instances MAY specify multiple schemas, to indicate all the schemas that
+ are applicable to the data, and the data SHOULD be valid by all the schemas.
+ The instance data MAY have multiple schemas
+ that it is defined by (the instance data SHOULD be valid for those schemas).
+ Or if the document is a collection of instances, the collection MAY contain
+ instances from different schemas. When collections contain heterogeneous
+ instances, the "pathStart" attribute MAY be specified in the
+ schema to disambiguate which schema should be applied for each item in the
collection. However, ultimately, the mechanism for referencing a schema is up to the
media type of the instance documents (if they choose to specify that schemas
can be referenced).
</t>
-
+
<section title="Self-Descriptive Schema">
<t>
- JSON Schemas can themselves be described using JSON Schemas.
+ JSON Schemas can themselves be described using JSON Schemas.
A self-describing JSON Schema for the core JSON Schema can
- be found at <eref target="http://json-schema.org/schema">http://json-schema.org/schema</eref> for the latest version or
- <eref target="http://json-schema.org/draft-03/schema">http://json-schema.org/draft-03/schema</eref> for the draft-03 version. The hyper schema
- self-description can be found at <eref target="http://json-schema.org/hyper-schema">http://json-schema.org/hyper-schema</eref>
+ be found at <eref target="http://json-schema.org/schema">http://json-schema.org/schema</eref> for the latest version or
+ <eref target="http://json-schema.org/draft-03/schema">http://json-schema.org/draft-03/schema</eref> for the draft-03 version. The hyper schema
+ self-description can be found at <eref target="http://json-schema.org/hyper-schema">http://json-schema.org/hyper-schema</eref>
or <eref target="http://json-schema.org/draft-03/hyper-schema">http://json-schema.org/draft-03/hyper-schema</eref>. All schemas
used within a protocol with media type definitions
SHOULD include a MIME parameter that refers to the self-descriptive
hyper schema or another schema that extends this hyper schema:
-
+
<figure>
<artwork>
-<![CDATA[
-Content-Type: application/json;
+<![CDATA[
+Content-Type: application/json;
profile=http://json-schema.org/draft-03/hyper-schema
]]>
</artwork>
@@ -277,15 +277,15 @@ Content-Type: application/json;
</t>
</section>
</section>
-
+
<section title="Core Schema Definition">
<t>
- A JSON Schema is a JSON Object that defines various attributes
+ A JSON Schema is a JSON Object that defines various attributes
(including usage and valid values) of a JSON value. JSON
Schema has recursive capabilities; there are a number of elements
in the structure that allow for nested JSON Schemas.
</t>
-
+
<figure>
<preamble>An example JSON Schema definition could look like:</preamble>
<artwork>
@@ -307,15 +307,15 @@ Content-Type: application/json;
]]>
</artwork>
</figure>
-
+
<t>
A JSON Schema object may have any of the following properties, called schema
attributes (all attributes are optional):
</t>
-
+
<section title="type">
<t>
- This attribute defines what the primitive type or the schema of the instance MUST be in order to validate.
+ This attribute defines what the primitive type or the schema of the instance MUST be in order to validate.
This attribute can take one of two forms:
<list style="hanging">
@@ -332,19 +332,19 @@ Content-Type: application/json;
<t hangText="null">Value MUST be null. Note this is mainly for purpose of being able use union types to define nullability. If this type is not included in a union, null values are not allowed (the primitives listed above do not allow nulls on their own).</t>
<t hangText="any">Value MAY be of any type including null.</t>
</list>
-
- If the property is not defined or is not in this list, then any type of value is acceptable.
- Other type values MAY be used for custom purposes, but minimal validators of the specification
+
+ If the property is not defined or is not in this list, then any type of value is acceptable.
+ Other type values MAY be used for custom purposes, but minimal validators of the specification
implementation can allow any instance value on unknown type values.
</t>
-
+
<t hangText="Union Types">
An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema.
- The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array.
+ The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array.
</t>
</list>
</t>
-
+
<figure>
<preamble>For example, a schema that defines if an instance can be a string or a number would be:</preamble>
<artwork>
@@ -355,38 +355,38 @@ Content-Type: application/json;
]]></artwork>
</figure>
</section>
-
+
<section title="properties" anchor="properties">
<t>This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order.</t>
</section>
-
+
<section title="patternProperties">
<t>This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.</t>
</section>
-
+
<section title="additionalProperties" anchor="additionalProperties">
<t>This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties.</t>
</section>
-
+
<section title="items">
<t>This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array.</t>
<t>When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema.</t>
<t>When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the <xref target="additionalItems">"additionalItems"</xref> attribute using the same rules as <xref target="additionalProperties">"additionalProperties"</xref> for objects.</t>
</section>
-
+
<section title="additionalItems" anchor="additionalItems">
<t>This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items.</t>
</section>
-
+
<section title="required">
<t>This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional.</t>
</section>
-
+
<section title="dependencies">
<t>This attribute is an object that defines the requirements of a property on an instance object. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value").</t>
<t>
The dependency value can take one of two forms:
-
+
<list style="hanging">
<t hangText="Simple Dependency">
If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value.
@@ -398,36 +398,36 @@ Content-Type: application/json;
</list>
</t>
</section>
-
+
<section title="minimum">
<t>This attribute defines the minimum value of the instance property when the type of the instance value is a number.</t>
</section>
-
+
<section title="maximum">
<t>This attribute defines the maximum value of the instance property when the type of the instance value is a number.</t>
</section>
-
+
<section title="exclusiveMinimum">
<t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value.</t>
</section>
-
+
<section title="exclusiveMaximum">
<t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value.</t>
</section>
-
+
<section title="minItems">
<t>This attribute defines the minimum number of values in an array when the array is the instance value.</t>
</section>
-
+
<section title="maxItems">
<t>This attribute defines the maximum number of values in an array when the array is the instance value.</t>
</section>
-
+
<section title="uniqueItems" anchor="uniqueItems">
<t>This attribute indicates that all items in an array instance MUST be unique (contains no two identical values).</t>
<t>
Two instance are consider equal if they are both of the same type and:
-
+
<list>
<t>are null; or</t>
<t>are booleans/numbers/strings and have the same value; or</t>
@@ -436,41 +436,41 @@ Content-Type: application/json;
</list>
</t>
</section>
-
+
<section title="pattern">
<t>When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5</t>
</section>
-
+
<section title="minLength">
<t>When the instance value is a string, this defines the minimum length of the string.</t>
</section>
-
+
<section title="maxLength">
<t>When the instance value is a string, this defines the maximum length of the string.</t>
</section>
-
+
<section title="enum">
<t>This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in <xref target="uniqueItems">"uniqueItems"</xref>.</t>
</section>
-
+
<section title="default">
<t>This attribute defines the default value of the instance when the instance is undefined.</t>
</section>
-
+
<section title="title">
<t>This attribute is a string that provides a short description of the instance property.</t>
</section>
-
+
<section title="description">
<t>This attribute is a string that provides a full description of the of purpose the instance property.</t>
</section>
-
+
<section title="format">
<t>This property defines the type of data, content type, or microformat to be expected in the instance property values. A format attribute MAY be one of the values listed below, and if so, SHOULD adhere to the semantics describing for the format. A format SHOULD only be used to give meaning to primitive types (string, integer, number, or boolean). Validators MAY (but are not required to) validate that the instance values conform to a format.</t>
-
+
<t>
The following formats are predefined:
-
+
<list style="hanging">
<t hangText="date-time">This SHOULD be a date in ISO 8601 format of YYYY-MM-DDThh:mm:ssZ in UTC time. This is the recommended form of date/timestamp.</t>
<t hangText="date">This SHOULD be a date in the format of YYYY-MM-DD. It is recommended that you use the "date-time" format instead of "date" unless you need to transfer only the date part.</t>
@@ -487,18 +487,18 @@ Content-Type: application/json;
<t hangText="host-name">This SHOULD be a host-name.</t>
</list>
</t>
-
+
<t>Additional custom formats MAY be created. These custom formats MAY be expressed as an URI, and this URI MAY reference a schema of that format.</t>
</section>
-
+
<section title="divisibleBy">
<t>This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0.</t>
</section>
-
+
<section title="disallow">
<t>This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid.</t>
</section>
-
+
<section title="extends">
<t>The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints.</t>
<t>
@@ -506,7 +506,7 @@ Content-Type: application/json;
instance against all constraints in the extending schema as well as
the extended schema(s). More optimized implementations that merge
schemas are possible, but are not required. Some examples of using "extends":
-
+
<figure>
<artwork>
<![CDATA[
@@ -522,7 +522,7 @@ Content-Type: application/json;
]]>
</artwork>
</figure>
-
+
<figure>
<artwork>
<![CDATA[
@@ -540,7 +540,7 @@ Content-Type: application/json;
</figure>
</t>
</section>
-
+
<section title="id">
<t>
This attribute defines the current URI of this schema (this attribute is
@@ -553,28 +553,28 @@ Content-Type: application/json;
is also used to construct relative references such as for $ref.
</t>
</section>
-
+
<section title="$ref">
<t>
- This attribute defines a URI of a schema that contains the full representation of this schema.
- When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance.
+ This attribute defines a URI of a schema that contains the full representation of this schema.
+ When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance.
This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema.
</t>
</section>
-
+
<section title="$schema">
<t>
- This attribute defines a URI of a JSON Schema that is the schema of the current schema.
+ This attribute defines a URI of a JSON Schema that is the schema of the current schema.
When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving <xref target="hyper-schema">Hyper Schema</xref><xref target="links">links</xref>.
</t>
-
+
<t>
- A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior.
+ A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior.
Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes.
</t>
</section>
</section>
-
+
<section title="Hyper Schema" anchor="hyper-schema">
<t>
The following attributes are specified in addition to those
@@ -586,28 +586,28 @@ Content-Type: application/json;
essentially describes plain JSON (no constraints on the structures).
Addition of attributes provides additive information for user agents.
</t>
-
+
<section title="links" anchor="links">
<t>
- The value of the links property MUST be an array, where each item
+ The value of the links property MUST be an array, where each item
in the array is a link description object which describes the link
relations of the instances.
</t>
-
+
<section title="Link Description Object">
<t>
- A link description object is used to describe link relations. In
- the context of a schema, it defines the link relations of the
+ A link description object is used to describe link relations. In
+ the context of a schema, it defines the link relations of the
instances of the schema, and can be parameterized by the instance
values. The link description format can be used on its own in
regular (non-schema documents), and use of this format can
be declared by referencing the normative link description
- schema as the the schema for the data structure that uses the
- links. The URI of the normative link description schema is:
+ schema as the the schema for the data structure that uses the
+ links. The URI of the normative link description schema is:
<eref target="http://json-schema.org/links">http://json-schema.org/links</eref> (latest version) or
<eref target="http://json-schema.org/draft-03/links">http://json-schema.org/draft-03/links</eref> (draft-03 version).
</t>
-
+
<section title="href">
<t>
The value of the "href" link description property
@@ -615,19 +615,19 @@ Content-Type: application/json;
of the instance property SHOULD be resolved as a URI-Reference per <xref target="RFC3986">RFC 3986</xref>
and MAY be a relative URI. The base URI to be used for relative resolution
SHOULD be the URI used to retrieve the instance object (not the schema)
- when used within a schema. Also, when links are used within a schema, the URI
- SHOULD be parametrized by the property values of the instance
+ when used within a schema. Also, when links are used within a schema, the URI
+ SHOULD be parametrized by the property values of the instance
object, if property values exist for the corresponding variables
in the template (otherwise they MAY be provided from alternate sources, like user input).
</t>
-
+
<t>
Instance property values SHOULD be substituted into the URIs where
matching braces ('{', '}') are found surrounding zero or more characters,
creating an expanded URI. Instance property value substitutions are resolved
by using the text between the braces to denote the property name
- from the instance to get the value to substitute.
-
+ from the instance to get the value to substitute.
+
<figure>
<preamble>For example, if an href value is defined:</preamble>
<artwork>
@@ -637,7 +637,7 @@ http://somesite.com/{id}
</artwork>
<postamble>Then it would be resolved by replace the value of the "id" property value from the instance object.</postamble>
</figure>
-
+
<figure>
<preamble>If the value of the "id" property was "45", the expanded URI would be:</preamble>
<artwork>
@@ -646,23 +646,23 @@ http://somesite.com/45
]]>
</artwork>
</figure>
-
- If matching braces are found with the string "@" (no quotes) between the braces, then the
+
+ If matching braces are found with the string "@" (no quotes) between the braces, then the
actual instance value SHOULD be used to replace the braces, rather than a property value.
- This should only be used in situations where the instance is a scalar (string,
+ This should only be used in situations where the instance is a scalar (string,
boolean, or number), and not for objects or arrays.
</t>
</section>
-
+
<section title="rel">
<t>
- The value of the "rel" property indicates the name of the
+ The value of the "rel" property indicates the name of the
relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation.
</t>
-
+
<t>
Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see <xref target="RFC4287">RFC 4287</xref>). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations:
-
+
<list style="hanging">
<t hangText="self">
If the relation value is "self", when this property is encountered in
@@ -670,15 +670,15 @@ http://somesite.com/45
treated as a full representation of the target resource identified by
the specified URI.
</t>
-
+
<t hangText="full">
This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation.
</t>
-
+
<t hangText="describedby">
This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures.
</t>
-
+
<t hangText="root">
This relation indicates that the target of the link
SHOULD be treated as the root or the body of the representation for the
@@ -688,7 +688,7 @@ http://somesite.com/45
</t>
</list>
</t>
-
+
<t>
The following relations are applicable for schemas (the schema as the "from" resource in the relation):
@@ -697,7 +697,7 @@ http://somesite.com/45
<t hangText="create">This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST).</t>
</list>
</t>
-
+
<t>
<figure>
<preamble>For example, if a schema is defined:</preamble>
@@ -718,7 +718,7 @@ http://somesite.com/45
]]>
</artwork>
</figure>
-
+
<figure>
<preamble>And if a collection of instance resource's JSON representation was retrieved:</preamble>
<artwork>
@@ -742,37 +742,37 @@ GET /Resource/
The "children" collection would be located at "/Resource/?upId=thing".
</t>
</section>
-
+
<section title="targetSchema">
<t>This property value is a schema that defines the expected structure of the JSON representation of the target of the link.</t>
</section>
-
+
<section title="Submission Link Properties">
<t>
- The following properties also apply to link definition objects, and
- provide functionality analogous to HTML forms, in providing a
+ The following properties also apply to link definition objects, and
+ provide functionality analogous to HTML forms, in providing a
means for submitting extra (often user supplied) information to send to a server.
</t>
-
+
<section title="method">
<t>
- This attribute defines which method can be used to access the target resource.
- In an HTTP environment, this would be "GET" or "POST" (other HTTP methods
- such as "PUT" and "DELETE" have semantics that are clearly implied by
- accessed resources, and do not need to be defined here).
+ This attribute defines which method can be used to access the target resource.
+ In an HTTP environment, this would be "GET" or "POST" (other HTTP methods
+ such as "PUT" and "DELETE" have semantics that are clearly implied by
+ accessed resources, and do not need to be defined here).
This defaults to "GET".
</t>
</section>
-
+
<section title="enctype">
<t>
If present, this property indicates a query media type format that the server
- supports for querying or posting to the collection of instances at the target
- resource. The query can be
+ supports for querying or posting to the collection of instances at the target
+ resource. The query can be
suffixed to the target URI to query the collection with
property-based constraints on the resources that SHOULD be returned from
the server or used to post data to the resource (depending on the method).
-
+
<figure>
<preamble>For example, with the following schema:</preamble>
<artwork>
@@ -793,7 +793,7 @@ GET /Resource/
</artwork>
<postamble>This indicates that the client can query the server for instances that have a specific name.</postamble>
</figure>
-
+
<figure>
<preamble>For example:</preamble>
<artwork>
@@ -803,23 +803,23 @@ GET /Resource/
</artwork>
</figure>
- If no enctype or method is specified, only the single URI specified by
- the href property is defined. If the method is POST, "application/json" is
+ If no enctype or method is specified, only the single URI specified by
+ the href property is defined. If the method is POST, "application/json" is
the default media type.
</t>
</section>
-
+
<section title="schema">
<t>
This attribute contains a schema which defines the acceptable structure of the submitted
- request (for a GET request, this schema would define the properties for the query string
+ request (for a GET request, this schema would define the properties for the query string
and for a POST request, this would define the body).
</t>
</section>
</section>
</section>
</section>
-
+
<section title="fragmentResolution">
<t>
This property indicates the fragment resolution protocol to use for
@@ -829,12 +829,12 @@ GET /Resource/
protocol is "slash-delimited", which is defined below. Other fragment
resolution protocols MAY be used, but are not defined in this document.
</t>
-
+
<t>
The fragment identifier is based on <xref target="RFC2396">RFC 2396, Sec 5</xref>, and defines the
mechanism for resolving references to entities within a document.
</t>
-
+
<section title="slash-delimited fragment resolution">
<t>
With the slash-delimited fragment resolution protocol, the fragment
@@ -852,15 +852,15 @@ GET /Resource/
item in array the array with the index defined by the next property
reference token (which MUST be a number). The target is successively
updated for each property reference token, until the entire fragment has
- been traversed.
+ been traversed.
</t>
-
+
<t>
- Property names SHOULD be URI-encoded. In particular, any "/" in a
- property name MUST be encoded to avoid being interpreted as a property
+ Property names SHOULD be URI-encoded. In particular, any "/" in a
+ property name MUST be encoded to avoid being interpreted as a property
delimiter.
</t>
-
+
<t>
<figure>
<preamble>For example, for the following JSON representation:</preamble>
@@ -879,7 +879,7 @@ GET /Resource/
]]>
</artwork>
</figure>
-
+
<figure>
<preamble>The following fragment identifiers would be resolved:</preamble>
<artwork>
@@ -889,10 +889,10 @@ fragment identifier resolution
# self, the root of the resource itself
#/foo the object referred to by the foo property
#/foo/another%20prop the object referred to by the "another prop"
- property of the object referred to by the
+ property of the object referred to by the
"foo" property
#/foo/another%20prop/baz the string referred to by the value of "baz"
- property of the "another prop" property of
+ property of the "another prop" property of
the object referred to by the "foo" property
#/foo/anArray/0 the first object in the "anArray" array
]]>
@@ -900,61 +900,61 @@ fragment identifier resolution
</figure>
</t>
</section>
-
+
<section title="dot-delimited fragment resolution">
<t>
- The dot-delimited fragment resolution protocol is the same as
- slash-delimited fragment resolution protocol except that the "." character
- (\x2E) is used as the delimiter between property names (instead of "/") and
+ The dot-delimited fragment resolution protocol is the same as
+ slash-delimited fragment resolution protocol except that the "." character
+ (\x2E) is used as the delimiter between property names (instead of "/") and
the path does not need to start with a ".". For example, #.foo and #foo are a valid fragment
identifiers for referencing the value of the foo propery.
</t>
</section>
</section>
-
+
<section title="readonly">
<t>This attribute indicates that the instance property SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server.</t>
</section>
-
+
<section title="contentEncoding">
<t>If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. <xref target="RFC2045">RFC 2045, Sec 6.1</xref> lists the possible values for this property.</t>
</section>
-
+
<section title="pathStart">
<t>
- This attribute is a URI that defines what the instance's URI MUST start with in order to validate.
- The value of the "pathStart" attribute MUST be resolved as per <xref target="RFC3986">RFC 3986, Sec 5</xref>,
+ This attribute is a URI that defines what the instance's URI MUST start with in order to validate.
+ The value of the "pathStart" attribute MUST be resolved as per <xref target="RFC3986">RFC 3986, Sec 5</xref>,
and is relative to the instance's URI.
</t>
-
+
<t>
- When multiple schemas have been referenced for an instance, the user agent
- can determine if this schema is applicable for a particular instance by
+ When multiple schemas have been referenced for an instance, the user agent
+ can determine if this schema is applicable for a particular instance by
determining if the URI of the instance begins with the the value of the "pathStart"
- attribute. If the URI of the instance does not start with this URI,
- or if another schema specifies a starting URI that is longer and also matches the
- instance, this schema SHOULD NOT be applied to the instance. Any schema
- that does not have a pathStart attribute SHOULD be considered applicable
+ attribute. If the URI of the instance does not start with this URI,
+ or if another schema specifies a starting URI that is longer and also matches the
+ instance, this schema SHOULD NOT be applied to the instance. Any schema
+ that does not have a pathStart attribute SHOULD be considered applicable
to all the instances for which it is referenced.
</t>
</section>
-
+
<section title="mediaType">
<t>This attribute defines the media type of the instance representations that this schema is defining.</t>
</section>
</section>
-
+
<section title="Security Considerations">
<t>
- This specification is a sub-type of the JSON format, and
- consequently the security considerations are generally the same as <xref target="RFC4627">RFC 4627</xref>.
+ This specification is a sub-type of the JSON format, and
+ consequently the security considerations are generally the same as <xref target="RFC4627">RFC 4627</xref>.
However, an additional issue is that when link relation of "self"
- is used to denote a full representation of an object, the user agent
+ is used to denote a full representation of an object, the user agent
SHOULD NOT consider the representation to be the authoritative representation
of the resource denoted by the target URI if the target URI is not
- equivalent to or a sub-path of the the URI used to request the resource
+ equivalent to or a sub-path of the the URI used to request the resource
representation which contains the target URI with the "self" link.
-
+
<figure>
<preamble>For example, if a hyper schema was defined:</preamble>
<artwork>
@@ -968,7 +968,7 @@ fragment identifier resolution
]]>
</artwork>
</figure>
-
+
<figure>
<preamble>And a resource was requested from somesite.com:</preamble>
<artwork>
@@ -1005,22 +1005,22 @@ Content-Type: application/json; profile=/schema-for-this-data
</figure>
</t>
</section>
-
+
<section title="IANA Considerations">
<t>The proposed MIME media type for JSON Schema is "application/schema+json".</t>
<t>Type name: application</t>
<t>Subtype name: schema+json</t>
<t>Required parameters: profile</t>
<t>
- The value of the profile parameter SHOULD be a URI (relative or absolute) that
- refers to the schema used to define the structure of this structure (the
+ The value of the profile parameter SHOULD be a URI (relative or absolute) that
+ refers to the schema used to define the structure of this structure (the
meta-schema). Normally the value would be http://json-schema.org/draft-03/hyper-schema,
but it is allowable to use other schemas that extend the hyper schema's meta-
schema.
</t>
<t>Optional parameters: pretty</t>
<t>The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read.</t>
-
+
<section title="Registry of Link Relations">
<t>
This registry is maintained by IANA per <xref target="RFC4287">RFC 4287</xref> and this specification adds
@@ -1032,7 +1032,7 @@ Content-Type: application/json; profile=/schema-for-this-data
</section>
</section>
</middle>
-
+
<back>
<!-- References Section -->
<references title="Normative References">
@@ -1080,7 +1080,7 @@ Content-Type: application/json; profile=/schema-for-this-data
<t>Added "$ref" and "$schema" attributes.</t>
</list>
</t>
-
+
<t hangText="draft-02">
<list style="symbols">
<t>Replaced "maxDecimal" attribute with "divisibleBy" attribute.</t>
@@ -1090,13 +1090,13 @@ Content-Type: application/json; profile=/schema-for-this-data
<t>Added "targetSchema" attribute to link description object.</t>
</list>
</t>
-
+
<t hangText="draft-01">
<list style="symbols">
<t>Fixed category and updates from template.</t>
</list>
</t>
-
+
<t hangText="draft-00">
<list style="symbols">
<t>Initial draft.</t>
@@ -1105,7 +1105,7 @@ Content-Type: application/json; profile=/schema-for-this-data
</list>
</t>
</section>
-
+
<section title="Open Issues">
<t>
<list>
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml
index 22fb3290df..f9c1ea5a0c 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/draft-zyp-json-schema-04.xml
@@ -23,7 +23,7 @@
<rfc category="info" docName="draft-zyp-json-schema-04" ipr="trust200902">
<front>
<title abbrev="JSON Schema Media Type">A JSON Media Type for Describing the Structure and Meaning of JSON Documents</title>
-
+
<author fullname="Kris Zyp" initials="K" role="editor" surname="Zyp">
<organization>SitePen (USA)</organization>
<address>
@@ -36,7 +36,7 @@
<email>kris@sitepen.com</email>
</address>
</author>
-
+
<author fullname="Gary Court" initials="G" surname="Court">
<address>
<postal>
@@ -47,7 +47,7 @@
<email>gary.court@gmail.com</email>
</address>
</author>
-
+
<date year="2011" />
<workgroup>Internet Engineering Task Force</workgroup>
<keyword>JSON</keyword>
@@ -57,48 +57,48 @@
<keyword>Notation</keyword>
<keyword>Hyper Schema</keyword>
<keyword>Hypermedia</keyword>
-
+
<abstract>
<t>
- JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json",
- a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON
- data is required for a given application and how to interact with it. JSON
- Schema is intended to define validation, documentation, hyperlink
- navigation, and interaction control of JSON data.
+ JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json",
+ a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON
+ data is required for a given application and how to interact with it. JSON
+ Schema is intended to define validation, documentation, hyperlink
+ navigation, and interaction control of JSON data.
</t>
</abstract>
</front>
-
+
<middle>
<section title="Introduction">
<t>
- JSON (JavaScript Object Notation) Schema is a JSON media type for defining
- the structure of JSON data. JSON Schema provides a contract for what JSON
- data is required for a given application and how to interact with it. JSON
- Schema is intended to define validation, documentation, hyperlink
- navigation, and interaction control of JSON data.
+ JSON (JavaScript Object Notation) Schema is a JSON media type for defining
+ the structure of JSON data. JSON Schema provides a contract for what JSON
+ data is required for a given application and how to interact with it. JSON
+ Schema is intended to define validation, documentation, hyperlink
+ navigation, and interaction control of JSON data.
</t>
</section>
-
+
<section title="Conventions and Terminology">
<t>
- <!-- The text in this section has been copied from the official boilerplate,
+ <!-- The text in this section has been copied from the official boilerplate,
and should not be modified.-->
-
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
+
+ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in <xref target="RFC2119">RFC 2119</xref>.
</t>
-
+
<t>
- The terms "JSON", "JSON text", "JSON value", "member", "element", "object",
- "array", "number", "string", "boolean", "true", "false", and "null" in this
+ The terms "JSON", "JSON text", "JSON value", "member", "element", "object",
+ "array", "number", "string", "boolean", "true", "false", and "null" in this
document are to be interpreted as defined in <xref target="RFC4627">RFC 4627</xref>.
</t>
-
+
<t>
This specification also uses the following defined terms:
-
+
<list style="hanging">
<t hangText="schema">A JSON Schema object.</t>
<t hangText="instance">Equivalent to "JSON value" as defined in <xref target="RFC4627">RFC 4627</xref>.</t>
@@ -108,35 +108,35 @@
</list>
</t>
</section>
-
+
<section title="Overview">
<t>
- JSON Schema defines the media type "application/schema+json" for
- describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities
+ JSON Schema defines the media type "application/schema+json" for
+ describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities
for describing the structure of JSON in terms of
allowable values, descriptions, and interpreting relations with other resources.
</t>
<t>
- This document is organized into several separate definitions. The first
- definition is the core schema specification. This definition is primary
+ This document is organized into several separate definitions. The first
+ definition is the core schema specification. This definition is primary
concerned with describing a JSON structure and specifying valid elements
in the structure. The second definition is the Hyper Schema specification
which is intended to define elements in a structure that can be interpreted as
hyperlinks.
- Hyper Schema builds on JSON Schema to describe the hyperlink structure of
+ Hyper Schema builds on JSON Schema to describe the hyperlink structure of
JSON values. This allows user agents to be able to successfully navigate
documents containing JSON based on their schemas.
</t>
<t>
- Cumulatively JSON Schema acts as meta-JSON that can be used to define the
+ Cumulatively JSON Schema acts as meta-JSON that can be used to define the
required type and constraints on JSON values, as well as define the meaning
of the JSON values for the purpose of describing a resource and determining
- hyperlinks within the representation.
+ hyperlinks within the representation.
</t>
<figure>
<preamble>An example JSON Schema that describes products might look like:</preamble>
<artwork>
-<![CDATA[
+<![CDATA[
{
"title": "Product",
"properties": {
@@ -171,12 +171,12 @@
]]>
</artwork>
<postamble>
- This schema defines the properties of the instance,
+ This schema defines the properties of the instance,
the required properties (id, name, and price), as well as an optional
property (tags). This also defines the link relations of the instance.
</postamble>
</figure>
-
+
<section title="Design Considerations">
<t>
The JSON Schema media type does not attempt to dictate the structure of JSON
@@ -195,7 +195,7 @@
This specification is protocol agnostic.
The underlying protocol (such as HTTP) should sufficiently define the
semantics of the client-server interface, the retrieval of resource
- representations linked to by JSON representations, and modification of
+ representations linked to by JSON representations, and modification of
those resources. The goal of this
format is to sufficiently describe JSON structures such that one can
utilize existing information available in existing JSON
@@ -204,35 +204,35 @@
</t>
</section>
</section>
-
+
<section title="Schema/Instance Association">
<t>
JSON values are correlated to their schema by the "describedby"
relation, where the schema is the target of the relation.
JSON values MUST be of the "application/json" media type or
- any other subtype. Consequently, dictating how a JSON value should
+ any other subtype. Consequently, dictating how a JSON value should
specify the relation to the schema is beyond the normative scope
of this document since this document specifically defines the JSON
Schema media type, and no other. It is RECOMMNENDED that JSON values
specify their schema so that user agents can interpret the instance
and retain the self-descriptive characteristics. This avoides the need for out-of-band information about
instance data. Two approaches are recommended for declaring the
- relation to the schema that describes the meaning of a JSON instance's (or collection
+ relation to the schema that describes the meaning of a JSON instance's (or collection
of instances) structure. A MIME type parameter named
"profile" or a relation of "describedby" (which could be specified by a Link header) may be used:
-
+
<figure>
<artwork>
-<![CDATA[
+<![CDATA[
Content-Type: application/my-media-type+json;
profile=http://example.com/my-hyper-schema
]]>
</artwork>
</figure>
-
+
or if the content is being transferred by a protocol (such as HTTP) that
provides headers, a Link header can be used:
-
+
<figure>
<artwork>
<![CDATA[
@@ -240,32 +240,32 @@ Link: <http://example.com/my-hyper-schema>; rel="describedby"
]]>
</artwork>
</figure>
-
- Instances MAY specify multiple schemas, to indicate all the schemas that
- are applicable to the data, and the data SHOULD be valid by all the schemas.
- The instance data MAY have multiple schemas
- that it is described by (the instance data SHOULD be valid for those schemas).
- Or if the document is a collection of instances, the collection MAY contain
- instances from different schemas. The mechanism for referencing a schema is
- determined by the media type of the instance (if it provides a method for
+
+ Instances MAY specify multiple schemas, to indicate all the schemas that
+ are applicable to the data, and the data SHOULD be valid by all the schemas.
+ The instance data MAY have multiple schemas
+ that it is described by (the instance data SHOULD be valid for those schemas).
+ Or if the document is a collection of instances, the collection MAY contain
+ instances from different schemas. The mechanism for referencing a schema is
+ determined by the media type of the instance (if it provides a method for
referencing schemas).
</t>
-
+
<section title="Self-Descriptive Schema">
<t>
- JSON Schemas can themselves be described using JSON Schemas.
+ JSON Schemas can themselves be described using JSON Schemas.
A self-describing JSON Schema for the core JSON Schema can
- be found at <eref target="http://json-schema.org/schema">http://json-schema.org/schema</eref> for the latest version or
- <eref target="http://json-schema.org/draft-04/schema">http://json-schema.org/draft-04/schema</eref> for the draft-04 version. The hyper schema
- self-description can be found at <eref target="http://json-schema.org/hyper-schema">http://json-schema.org/hyper-schema</eref>
+ be found at <eref target="http://json-schema.org/schema">http://json-schema.org/schema</eref> for the latest version or
+ <eref target="http://json-schema.org/draft-04/schema">http://json-schema.org/draft-04/schema</eref> for the draft-04 version. The hyper schema
+ self-description can be found at <eref target="http://json-schema.org/hyper-schema">http://json-schema.org/hyper-schema</eref>
or <eref target="http://json-schema.org/draft-04/hyper-schema">http://json-schema.org/draft-04/hyper-schema</eref>. All schemas
used within a protocol with a media type specified SHOULD include a MIME parameter that refers to the self-descriptive
hyper schema or another schema that extends this hyper schema:
-
+
<figure>
<artwork>
-<![CDATA[
-Content-Type: application/json;
+<![CDATA[
+Content-Type: application/json;
profile=http://json-schema.org/draft-04/hyper-schema
]]>
</artwork>
@@ -273,15 +273,15 @@ Content-Type: application/json;
</t>
</section>
</section>
-
+
<section title="Core Schema Definition">
<t>
- A JSON Schema is a JSON object that defines various attributes
+ A JSON Schema is a JSON object that defines various attributes
(including usage and valid values) of a JSON value. JSON
Schema has recursive capabilities; there are a number of elements
in the structure that allow for nested JSON Schemas.
</t>
-
+
<figure>
<preamble>An example JSON Schema could look like:</preamble>
<artwork>
@@ -305,17 +305,17 @@ Content-Type: application/json;
]]>
</artwork>
</figure>
-
+
<t>
A JSON Schema object MAY have any of the following optional properties:
</t>
-
+
<!-- TODO: Break attributes up into type sections -->
<!-- TODO: Add examples for (almost) every attribute -->
-
+
<section title="type" anchor="type">
<t>
- This attribute defines what the primitive type or the schema of the instance MUST be in order to validate.
+ This attribute defines what the primitive type or the schema of the instance MUST be in order to validate.
This attribute can take one of two forms:
<list style="hanging">
@@ -332,16 +332,16 @@ Content-Type: application/json;
<t hangText="any">Instance MAY be of any type, including null.</t>
</list>
</t>
-
+
<t hangText="Union Types">
An array of one or more simple or schema types.
- The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array.
+ The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array.
</t>
</list>
-
- If this attribute is not specified, then all value types are accepted.
+
+ If this attribute is not specified, then all value types are accepted.
</t>
-
+
<figure>
<preamble>For example, a schema that defines if an instance can be a string or a number would be:</preamble>
<artwork>
@@ -352,37 +352,37 @@ Content-Type: application/json;
]]></artwork>
</figure>
</section>
-
+
<section title="properties" anchor="properties">
<t>
This attribute is an object with properties that specify the schemas for the properties of the instance object.
- In this attribute's object, each property value MUST be a schema.
+ In this attribute's object, each property value MUST be a schema.
When the instance value is an object, the value of the instance's properties MUST be valid according to the schemas with the same property names specified in this attribute.
Objects are unordered, so therefore the order of the instance properties or attribute properties MUST NOT determine validation success.
</t>
</section>
-
+
<section title="patternProperties" anchor="patternProperties">
<t>
- This attribute is an object that defines the schema for a set of property names of an object instance.
- The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema.
+ This attribute is an object that defines the schema for a set of property names of an object instance.
+ The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema.
If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value.
</t>
</section>
-
+
<section title="additionalProperties" anchor="additionalProperties">
- <t>This attribute specifies how any instance property that is not explicitly defined by either the <xref target="properties">"properties"</xref> or <xref target="patternProperties">"patternProperties"</xref> attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean.</t>
+ <t>This attribute specifies how any instance property that is not explicitly defined by either the <xref target="properties">"properties"</xref> or <xref target="patternProperties">"patternProperties"</xref> attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean.</t>
<t>If a schema is provided, then all additional properties MUST be valid according to the schema.</t>
<t>If false is provided, then no additional properties are allowed.</t>
<t>The default value is an empty schema, which allows any value for additional properties.</t>
</section>
-
+
<section title="items" anchor="items">
<t>This attribute provides the allowed items in an array instance. If specified, this attribute MUST be a schema or an array of schemas.</t>
<t>When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema.</t>
<t>When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST be valid according to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the <xref target="additionalItems">"additionalItems"</xref> attribute the same way as <xref target="additionalProperties">"additionalProperties"</xref> for objects is.</t>
</section>
-
+
<section title="additionalItems" anchor="additionalItems">
<t>This attribute specifies how any item in the array instance that is not explicitly defined by <xref target="items">"items"</xref> (hereafter referred to as "additional items") is handled. If specified, the value MUST be a schema or a boolean.</t>
<t>If a schema is provided:
@@ -395,16 +395,16 @@ Content-Type: application/json;
<t>If false is provided, then any additional items in the array are not allowed.</t>
<t>The default value is an empty schema, which allows any value for additional items.</t>
</section>
-
+
<section title="required" anchor="required">
<t>This attribute is an array of strings that defines all the property names that must exist on the object instance.</t>
</section>
-
+
<section title="dependencies" anchor="dependencies">
<t>This attribute is an object that specifies the requirements of a property on an object instance. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value").</t>
<t>
The dependency value can take one of two forms:
-
+
<list style="hanging">
<t hangText="Simple Dependency">
If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value.
@@ -416,44 +416,44 @@ Content-Type: application/json;
</list>
</t>
</section>
-
+
<section title="minimum" anchor="minimum">
<t>This attribute defines the minimum value of the instance property when the type of the instance value is a number.</t>
</section>
-
+
<section title="maximum" anchor="maximum">
<t>This attribute defines the maximum value of the instance property when the type of the instance value is a number.</t>
</section>
-
+
<section title="exclusiveMinimum" anchor="exclusiveMinimum">
<t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value.</t>
</section>
-
+
<section title="exclusiveMaximum" anchor="exclusiveMaximum">
<t>This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value.</t>
</section>
-
+
<section title="minItems" anchor="minItems">
<t>This attribute defines the minimum number of values in an array when the array is the instance value.</t>
</section>
-
+
<section title="maxItems" anchor="maxItems">
<t>This attribute defines the maximum number of values in an array when the array is the instance value.</t>
</section>
-
+
<section title="minProperties" anchor="minProperties">
<t>This attribute defines the minimum number of properties required on an object instance.</t>
</section>
-
+
<section title="maxProperties" anchor="maxProperties">
<t>This attribute defines the maximum number of properties the object instance can have.</t>
</section>
-
+
<section title="uniqueItems" anchor="uniqueItems">
<t>This attribute indicates that all items in an array instance MUST be unique (contains no two identical values).</t>
<t>
Two instance are consider equal if they are both of the same type and:
-
+
<list>
<t>are null; or</t>
<t>are booleans/numbers/strings and have the same value; or</t>
@@ -462,43 +462,43 @@ Content-Type: application/json;
</list>
</t>
</section>
-
+
<section title="pattern" anchor="pattern">
<t>When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5</t>
</section>
-
+
<section title="minLength" anchor="minLength">
<t>When the instance value is a string, this defines the minimum length of the string.</t>
</section>
-
+
<section title="maxLength" anchor="maxLength">
<t>When the instance value is a string, this defines the maximum length of the string.</t>
</section>
-
+
<section title="enum" anchor="enum">
<t>This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in <xref target="uniqueItems">"uniqueItems"</xref>.</t>
</section>
-
+
<section title="default" anchor="default">
<t>This attribute defines the default value of the instance when the instance is undefined.</t>
</section>
-
+
<section title="title" anchor="title">
<t>This attribute is a string that provides a short description of the instance property.</t>
</section>
-
+
<section title="description" anchor="description">
<t>This attribute is a string that provides a full description of the of purpose the instance property.</t>
</section>
-
+
<section title="divisibleBy" anchor="divisibleBy">
<t>This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0.</t>
</section>
-
+
<section title="disallow" anchor="disallow">
<t>This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid.</t>
</section>
-
+
<section title="extends" anchor="extends">
<t>The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints.</t>
<t>
@@ -506,7 +506,7 @@ Content-Type: application/json;
instance against all constraints in the extending schema as well as
the extended schema(s). More optimized implementations that merge
schemas are possible, but are not required. Some examples of using "extends":
-
+
<figure>
<artwork>
<![CDATA[
@@ -522,7 +522,7 @@ Content-Type: application/json;
]]>
</artwork>
</figure>
-
+
<figure>
<artwork>
<![CDATA[
@@ -540,7 +540,7 @@ Content-Type: application/json;
</figure>
</t>
</section>
-
+
<section title="id" anchor="id">
<t>
This attribute defines the current URI of this schema (this attribute is
@@ -553,28 +553,28 @@ Content-Type: application/json;
is also used to construct relative references such as for $ref.
</t>
</section>
-
+
<section title="$ref" anchor="ref">
<t>
- This attribute defines a URI of a schema that contains the full representation of this schema.
- When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance.
+ This attribute defines a URI of a schema that contains the full representation of this schema.
+ When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance.
This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema.
</t>
</section>
-
+
<section title="$schema" anchor="schema">
<t>
- This attribute defines a URI of a JSON Schema that is the schema of the current schema.
+ This attribute defines a URI of a JSON Schema that is the schema of the current schema.
When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving <xref target="hyper-schema">Hyper Schema</xref><xref target="links">links</xref>.
</t>
-
+
<t>
- A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior.
+ A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior.
Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes.
</t>
</section>
</section>
-
+
<section title="Hyper Schema" anchor="hyper-schema">
<t>
The following attributes are specified in addition to those
@@ -586,30 +586,30 @@ Content-Type: application/json;
essentially describes plain JSON (no constraints on the structures).
Addition of attributes provides additive information for user agents.
</t>
-
+
<section title="links" anchor="links">
<t>
- The value of the links property MUST be an array, where each item
+ The value of the links property MUST be an array, where each item
in the array is a link description object which describes the link
relations of the instances.
</t>
-
+
<!-- TODO: Needs more clarification and examples -->
-
+
<section title="Link Description Object">
<t>
- A link description object is used to describe link relations. In
- the context of a schema, it defines the link relations of the
+ A link description object is used to describe link relations. In
+ the context of a schema, it defines the link relations of the
instances of the schema, and can be parameterized by the instance
- values. The link description format can be used without JSON Schema,
+ values. The link description format can be used without JSON Schema,
and use of this format can
be declared by referencing the normative link description
- schema as the the schema for the data structure that uses the
- links. The URI of the normative link description schema is:
+ schema as the the schema for the data structure that uses the
+ links. The URI of the normative link description schema is:
<eref target="http://json-schema.org/links">http://json-schema.org/links</eref> (latest version) or
<eref target="http://json-schema.org/draft-04/links">http://json-schema.org/draft-04/links</eref> (draft-04 version).
</t>
-
+
<section title="href" anchor="href">
<t>
The value of the "href" link description property
@@ -617,19 +617,19 @@ Content-Type: application/json;
of the instance property SHOULD be resolved as a URI-Reference per <xref target="RFC3986">RFC 3986</xref>
and MAY be a relative URI. The base URI to be used for relative resolution
SHOULD be the URI used to retrieve the instance object (not the schema)
- when used within a schema. Also, when links are used within a schema, the URI
- SHOULD be parametrized by the property values of the instance
+ when used within a schema. Also, when links are used within a schema, the URI
+ SHOULD be parametrized by the property values of the instance
object, if property values exist for the corresponding variables
in the template (otherwise they MAY be provided from alternate sources, like user input).
</t>
-
+
<t>
Instance property values SHOULD be substituted into the URIs where
matching braces ('{', '}') are found surrounding zero or more characters,
creating an expanded URI. Instance property value substitutions are resolved
by using the text between the braces to denote the property name
- from the instance to get the value to substitute.
-
+ from the instance to get the value to substitute.
+
<figure>
<preamble>For example, if an href value is defined:</preamble>
<artwork>
@@ -639,7 +639,7 @@ http://somesite.com/{id}
</artwork>
<postamble>Then it would be resolved by replace the value of the "id" property value from the instance object.</postamble>
</figure>
-
+
<figure>
<preamble>If the value of the "id" property was "45", the expanded URI would be:</preamble>
<artwork>
@@ -648,23 +648,23 @@ http://somesite.com/45
]]>
</artwork>
</figure>
-
- If matching braces are found with the string "@" (no quotes) between the braces, then the
+
+ If matching braces are found with the string "@" (no quotes) between the braces, then the
actual instance value SHOULD be used to replace the braces, rather than a property value.
- This should only be used in situations where the instance is a scalar (string,
+ This should only be used in situations where the instance is a scalar (string,
boolean, or number), and not for objects or arrays.
</t>
</section>
-
+
<section title="rel">
<t>
- The value of the "rel" property indicates the name of the
+ The value of the "rel" property indicates the name of the
relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation.
</t>
-
+
<t>
Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see <xref target="RFC4287">RFC 4287</xref>). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations:
-
+
<list style="hanging">
<t hangText="self">
If the relation value is "self", when this property is encountered in
@@ -672,15 +672,15 @@ http://somesite.com/45
treated as a full representation of the target resource identified by
the specified URI.
</t>
-
+
<t hangText="full">
This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation.
</t>
-
+
<t hangText="describedby">
This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures.
</t>
-
+
<t hangText="root">
This relation indicates that the target of the link
SHOULD be treated as the root or the body of the representation for the
@@ -690,7 +690,7 @@ http://somesite.com/45
</t>
</list>
</t>
-
+
<t>
The following relations are applicable for schemas (the schema as the "from" resource in the relation):
@@ -699,7 +699,7 @@ http://somesite.com/45
<t hangText="create">This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST).</t>
</list>
</t>
-
+
<t>
<figure>
<preamble>For example, if a schema is defined:</preamble>
@@ -720,7 +720,7 @@ http://somesite.com/45
]]>
</artwork>
</figure>
-
+
<figure>
<preamble>And if a collection of instance resource's JSON representation was retrieved:</preamble>
<artwork>
@@ -744,41 +744,41 @@ GET /Resource/
The "children" collection would be located at "/Resource/?upId=thing".
</t>
</section>
-
+
<section title="template">
<t>This property value is a string that defines the templating language used in the <xref target="href">"href"</xref> attribute. If no templating language is defined, then the default <xref target="href">Link Description Object templating langauge</xref> is used.</t>
</section>
-
+
<section title="targetSchema">
<t>This property value is a schema that defines the expected structure of the JSON representation of the target of the link.</t>
</section>
-
+
<section title="Submission Link Properties">
<t>
- The following properties also apply to link definition objects, and
- provide functionality analogous to HTML forms, in providing a
+ The following properties also apply to link definition objects, and
+ provide functionality analogous to HTML forms, in providing a
means for submitting extra (often user supplied) information to send to a server.
</t>
-
+
<section title="method">
<t>
- This attribute defines which method can be used to access the target resource.
- In an HTTP environment, this would be "GET" or "POST" (other HTTP methods
- such as "PUT" and "DELETE" have semantics that are clearly implied by
- accessed resources, and do not need to be defined here).
+ This attribute defines which method can be used to access the target resource.
+ In an HTTP environment, this would be "GET" or "POST" (other HTTP methods
+ such as "PUT" and "DELETE" have semantics that are clearly implied by
+ accessed resources, and do not need to be defined here).
This defaults to "GET".
</t>
</section>
-
+
<section title="enctype">
<t>
If present, this property indicates a query media type format that the server
- supports for querying or posting to the collection of instances at the target
- resource. The query can be
+ supports for querying or posting to the collection of instances at the target
+ resource. The query can be
suffixed to the target URI to query the collection with
property-based constraints on the resources that SHOULD be returned from
the server or used to post data to the resource (depending on the method).
-
+
<figure>
<preamble>For example, with the following schema:</preamble>
<artwork>
@@ -799,7 +799,7 @@ GET /Resource/
</artwork>
<postamble>This indicates that the client can query the server for instances that have a specific name.</postamble>
</figure>
-
+
<figure>
<preamble>For example:</preamble>
<artwork>
@@ -809,23 +809,23 @@ GET /Resource/
</artwork>
</figure>
- If no enctype or method is specified, only the single URI specified by
- the href property is defined. If the method is POST, "application/json" is
+ If no enctype or method is specified, only the single URI specified by
+ the href property is defined. If the method is POST, "application/json" is
the default media type.
</t>
</section>
-
+
<section title="schema">
<t>
This attribute contains a schema which defines the acceptable structure of the submitted
- request (for a GET request, this schema would define the properties for the query string
+ request (for a GET request, this schema would define the properties for the query string
and for a POST request, this would define the body).
</t>
</section>
</section>
</section>
</section>
-
+
<section title="fragmentResolution">
<t>
This property indicates the fragment resolution protocol to use for
@@ -835,62 +835,62 @@ GET /Resource/
protocol is "json-pointer", which is defined below. Other fragment
resolution protocols MAY be used, but are not defined in this document.
</t>
-
+
<t>
The fragment identifier is based on <xref target="RFC3986">RFC 3986, Sec 5</xref>, and defines the
mechanism for resolving references to entities within a document.
</t>
-
+
<section title="json-pointer fragment resolution">
<t>The "json-pointer" fragment resolution protocol uses a <xref target="json-pointer">JSON Pointer</xref> to resolve fragment identifiers in URIs within instance representations.</t>
</section>
</section>
-
+
<!-- TODO: Remove this? -->
-
+
<section title="readonly">
<t>This attribute indicates that the instance value SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server.</t>
</section>
-
+
<section title="contentEncoding">
<t>If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. <xref target="RFC2045">RFC 2045, Sec 6.1</xref> lists the possible values for this property.</t>
</section>
-
+
<section title="pathStart">
<t>
- This attribute is a URI that defines what the instance's URI MUST start with in order to validate.
- The value of the "pathStart" attribute MUST be resolved as per <xref target="RFC3986">RFC 3986, Sec 5</xref>,
+ This attribute is a URI that defines what the instance's URI MUST start with in order to validate.
+ The value of the "pathStart" attribute MUST be resolved as per <xref target="RFC3986">RFC 3986, Sec 5</xref>,
and is relative to the instance's URI.
</t>
-
+
<t>
- When multiple schemas have been referenced for an instance, the user agent
- can determine if this schema is applicable for a particular instance by
+ When multiple schemas have been referenced for an instance, the user agent
+ can determine if this schema is applicable for a particular instance by
determining if the URI of the instance begins with the the value of the "pathStart"
- attribute. If the URI of the instance does not start with this URI,
- or if another schema specifies a starting URI that is longer and also matches the
- instance, this schema SHOULD NOT be applied to the instance. Any schema
- that does not have a pathStart attribute SHOULD be considered applicable
+ attribute. If the URI of the instance does not start with this URI,
+ or if another schema specifies a starting URI that is longer and also matches the
+ instance, this schema SHOULD NOT be applied to the instance. Any schema
+ that does not have a pathStart attribute SHOULD be considered applicable
to all the instances for which it is referenced.
</t>
</section>
-
+
<section title="mediaType">
<t>This attribute defines the media type of the instance representations that this schema is defining.</t>
</section>
</section>
-
+
<section title="Security Considerations">
<t>
- This specification is a sub-type of the JSON format, and
- consequently the security considerations are generally the same as <xref target="RFC4627">RFC 4627</xref>.
+ This specification is a sub-type of the JSON format, and
+ consequently the security considerations are generally the same as <xref target="RFC4627">RFC 4627</xref>.
However, an additional issue is that when link relation of "self"
- is used to denote a full representation of an object, the user agent
+ is used to denote a full representation of an object, the user agent
SHOULD NOT consider the representation to be the authoritative representation
of the resource denoted by the target URI if the target URI is not
- equivalent to or a sub-path of the the URI used to request the resource
+ equivalent to or a sub-path of the the URI used to request the resource
representation which contains the target URI with the "self" link.
-
+
<figure>
<preamble>For example, if a hyper schema was defined:</preamble>
<artwork>
@@ -904,7 +904,7 @@ GET /Resource/
]]>
</artwork>
</figure>
-
+
<figure>
<preamble>And a resource was requested from somesite.com:</preamble>
<artwork>
@@ -941,22 +941,22 @@ Content-Type: application/json; profile=/schema-for-this-data
</figure>
</t>
</section>
-
+
<section title="IANA Considerations">
<t>The proposed MIME media type for JSON Schema is "application/schema+json".</t>
<t>Type name: application</t>
<t>Subtype name: schema+json</t>
<t>Required parameters: profile</t>
<t>
- The value of the profile parameter SHOULD be a URI (relative or absolute) that
- refers to the schema used to define the structure of this structure (the
+ The value of the profile parameter SHOULD be a URI (relative or absolute) that
+ refers to the schema used to define the structure of this structure (the
meta-schema). Normally the value would be http://json-schema.org/draft-04/hyper-schema,
but it is allowable to use other schemas that extend the hyper schema's meta-
schema.
</t>
<t>Optional parameters: pretty</t>
<t>The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read.</t>
-
+
<section title="Registry of Link Relations">
<t>
This registry is maintained by IANA per <xref target="RFC4287">RFC 4287</xref> and this specification adds
@@ -968,7 +968,7 @@ Content-Type: application/json; profile=/schema-for-this-data
</section>
</section>
</middle>
-
+
<back>
<!-- References Section -->
<references title="Normative References">
@@ -1019,7 +1019,7 @@ Content-Type: application/json; profile=/schema-for-this-data
<t>Improved wording of many sections.</t>
</list>
</t>
-
+
<t hangText="draft-03">
<list style="symbols">
<t>Added example and verbiage to "extends" attribute.</t>
@@ -1043,7 +1043,7 @@ Content-Type: application/json; profile=/schema-for-this-data
<t>Added "$ref" and "$schema" attributes.</t>
</list>
</t>
-
+
<t hangText="draft-02">
<list style="symbols">
<t>Replaced "maxDecimal" attribute with "divisibleBy" attribute.</t>
@@ -1053,13 +1053,13 @@ Content-Type: application/json; profile=/schema-for-this-data
<t>Added "targetSchema" attribute to link description object.</t>
</list>
</t>
-
+
<t hangText="draft-01">
<list style="symbols">
<t>Fixed category and updates from template.</t>
</list>
</t>
-
+
<t hangText="draft-00">
<list style="symbols">
<t>Initial draft.</t>
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js
index 60b3823334..5b1bbbfdd6 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/links.js
@@ -1,4 +1,4 @@
-/**
+/**
* JSON Schema link handler
* Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com)
* Licensed under the MIT (MIT-LICENSE.txt) license.
@@ -11,11 +11,11 @@ exports.getLink = function(relation, instance, schema){
// gets the URI of the link for the given relation based on the instance and schema
// for example:
// getLink(
- // "brother",
- // {"brother_id":33},
+ // "brother",
+ // {"brother_id":33},
// {links:[{rel:"brother", href:"Brother/{brother_id}"}]}) ->
// "Brother/33"
- var links = schema.__linkTemplates;
+ var links = schema.__linkTemplates;
if(!links){
links = {};
var schemaLinks = schema.links;
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js
index 53c7233cc8..97cbbf6fa3 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/lib/validate.js
@@ -194,8 +194,8 @@ var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*O
if(typeof instance != 'object' || instance instanceof Array){
errors.push({property:path,message:"an object is required"});
}
-
- for(var i in objTypeDef){
+
+ for(var i in objTypeDef){
if(objTypeDef.hasOwnProperty(i)){
var value = instance[i];
// skip _not_ specified properties
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json
index ff4eeb1167..b77d8b3466 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/json-schema/package.json
@@ -1,8 +1,16 @@
{
"_args": [
[
- "json-schema@0.2.2",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim"
+ {
+ "raw": "json-schema@0.2.2",
+ "scope": null,
+ "escapedName": "json-schema",
+ "name": "json-schema",
+ "rawSpec": "0.2.2",
+ "spec": "0.2.2",
+ "type": "version"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim"
]
],
"_from": "json-schema@0.2.2",
@@ -11,16 +19,17 @@
"_installable": true,
"_location": "/request/http-signature/jsprim/json-schema",
"_npmUser": {
- "email": "kriszyp@gmail.com",
- "name": "kriszyp"
+ "name": "kriszyp",
+ "email": "kriszyp@gmail.com"
},
"_npmVersion": "1.1.59",
"_phantomChildren": {},
"_requested": {
- "name": "json-schema",
"raw": "json-schema@0.2.2",
- "rawSpec": "0.2.2",
"scope": null,
+ "escapedName": "json-schema",
+ "name": "json-schema",
+ "rawSpec": "0.2.2",
"spec": "0.2.2",
"type": "version"
},
@@ -31,7 +40,7 @@
"_shasum": "50354f19f603917c695f70b85afa77c3b0f23506",
"_shrinkwrap": null,
"_spec": "json-schema@0.2.2",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim",
"author": {
"name": "Kris Zyp"
},
@@ -48,7 +57,7 @@
},
"dist": {
"shasum": "50354f19f603917c695f70b85afa77c3b0f23506",
- "tarball": "http://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz"
+ "tarball": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.2.tgz"
},
"homepage": "https://github.com/kriszyp/json-schema#readme",
"keywords": [
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/README.md
index 3393baeecb..e9b5497851 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/README.md
@@ -41,7 +41,7 @@ request handler that stats a file and fails if it doesn't exist:
fs.stat(filename, function (err) {
if (err)
/* Annotate the "stat" error with what we were doing. */
- return (callback(new verror.VError(err,
+ return (callback(new verror.VError(err,
'failed to check "%s"', filename)));
/* ... */
@@ -49,14 +49,14 @@ request handler that stats a file and fails if it doesn't exist:
}
function handleRequest(filename, callback) {
- checkFile('/nonexistent', function (err) {
- if (err) {
- /* Annotate the "checkFile" error with what we were doing. */
- return (callback(new verror.VError(err, 'request failed')));
- }
-
- /* ... */
- });
+ checkFile('/nonexistent', function (err) {
+ if (err) {
+ /* Annotate the "checkFile" error with what we were doing. */
+ return (callback(new verror.VError(err, 'request failed')));
+ }
+
+ /* ... */
+ });
}
handleRequest('/nonexistent', function (err) {
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/jsl.node.conf b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/jsl.node.conf
index 9b19899be6..bd724a2c78 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/jsl.node.conf
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/jsl.node.conf
@@ -1,5 +1,5 @@
#
-# Configuration File for JavaScript Lint
+# Configuration File for JavaScript Lint
#
# This configuration file can be used to lint a collection of scripts, or to enable
# or disable warnings for scripts that are linted via the command line.
@@ -136,3 +136,4 @@
# To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
# or "+process Folder\Path\*.htm".
#
+
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/package.json
index d1cd81287b..888fea03eb 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/package.json
@@ -1,8 +1,16 @@
{
"_args": [
[
- "verror@1.3.6",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim"
+ {
+ "raw": "verror@1.3.6",
+ "scope": null,
+ "escapedName": "verror",
+ "name": "verror",
+ "rawSpec": "1.3.6",
+ "spec": "1.3.6",
+ "type": "version"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim"
]
],
"_from": "verror@1.3.6",
@@ -11,16 +19,17 @@
"_installable": true,
"_location": "/request/http-signature/jsprim/verror",
"_npmUser": {
- "email": "dap@cs.brown.edu",
- "name": "dap"
+ "name": "dap",
+ "email": "dap@cs.brown.edu"
},
"_npmVersion": "1.1.65",
"_phantomChildren": {},
"_requested": {
- "name": "verror",
"raw": "verror@1.3.6",
- "rawSpec": "1.3.6",
"scope": null,
+ "escapedName": "verror",
+ "name": "verror",
+ "rawSpec": "1.3.6",
"spec": "1.3.6",
"type": "version"
},
@@ -31,7 +40,7 @@
"_shasum": "cff5df12946d297d2baaefaa2689e25be01c005c",
"_shrinkwrap": null,
"_spec": "verror@1.3.6",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim",
"bugs": {
"url": "https://github.com/davepacheco/node-verror/issues"
},
@@ -43,7 +52,7 @@
"directories": {},
"dist": {
"shasum": "cff5df12946d297d2baaefaa2689e25be01c005c",
- "tarball": "http://registry.npmjs.org/verror/-/verror-1.3.6.tgz"
+ "tarball": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz"
},
"engines": [
"node >=0.6.0"
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json
index c172f62337..e7c3241184 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/package.json
@@ -1,38 +1,51 @@
{
"_args": [
[
- "jsprim@^1.2.2",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature"
+ {
+ "raw": "jsprim@^1.2.2",
+ "scope": null,
+ "escapedName": "jsprim",
+ "name": "jsprim",
+ "rawSpec": "^1.2.2",
+ "spec": ">=1.2.2 <2.0.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature"
]
],
"_from": "jsprim@>=1.2.2 <2.0.0",
- "_id": "jsprim@1.2.2",
+ "_id": "jsprim@1.3.0",
"_inCache": true,
"_installable": true,
"_location": "/request/http-signature/jsprim",
- "_nodeVersion": "0.12.2",
+ "_nodeVersion": "0.12.7",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/jsprim-1.3.0.tgz_1466708163640_0.5282344303559512"
+ },
"_npmUser": {
- "email": "dap@cs.brown.edu",
- "name": "dap"
+ "name": "dap",
+ "email": "dap@cs.brown.edu"
},
- "_npmVersion": "2.7.4",
+ "_npmVersion": "2.11.3",
"_phantomChildren": {},
"_requested": {
- "name": "jsprim",
"raw": "jsprim@^1.2.2",
- "rawSpec": "^1.2.2",
"scope": null,
+ "escapedName": "jsprim",
+ "name": "jsprim",
+ "rawSpec": "^1.2.2",
"spec": ">=1.2.2 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/request/http-signature"
],
- "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.2.2.tgz",
- "_shasum": "f20c906ac92abd58e3b79ac8bc70a48832512da1",
+ "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz",
+ "_shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650",
"_shrinkwrap": null,
"_spec": "jsprim@^1.2.2",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature",
"bugs": {
"url": "https://github.com/davepacheco/node-jsprim/issues"
},
@@ -45,14 +58,14 @@
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "f20c906ac92abd58e3b79ac8bc70a48832512da1",
- "tarball": "http://registry.npmjs.org/jsprim/-/jsprim-1.2.2.tgz"
+ "shasum": "ce2e1bef835204b4f3099928c602f8b6ae615650",
+ "tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.3.0.tgz"
},
"engines": [
"node >=0.6.0"
],
- "gitHead": "0e709876c35eddfe4c1f95104ac3c4abfc9dab84",
- "homepage": "https://github.com/davepacheco/node-jsprim",
+ "gitHead": "694edcb22e2291c21f6c2a23907bf02e1edbfdf4",
+ "homepage": "https://github.com/davepacheco/node-jsprim#readme",
"license": "MIT",
"main": "./lib/jsprim.js",
"maintainers": [
@@ -69,5 +82,5 @@
"url": "git://github.com/davepacheco/node-jsprim.git"
},
"scripts": {},
- "version": "1.2.2"
+ "version": "1.3.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/.travis.yml b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/.travis.yml
index 54692343d9..c3394c258f 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/.travis.yml
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/.travis.yml
@@ -1,11 +1,11 @@
language: node_js
node_js:
- - "4.2"
+ - "5.10"
+ - "4.4"
- "4.1"
- "0.12"
- "0.10"
- - "0.8"
before_install:
- "make check"
after_success:
- - '[ "${TRAVIS_NODE_VERSION}" = "4.2" ] && make codecovio'
+ - '[ "${TRAVIS_NODE_VERSION}" = "4.4" ] && make codecovio'
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md
index bc34d48a49..00a4055204 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/README.md
@@ -4,7 +4,7 @@ sshpk
Parse, convert, fingerprint and use SSH keys (both public and private) in pure
node -- no `ssh-keygen` or other external dependencies.
-Supports RSA, DSA, ECDSA (nistp-\*) and ED25519 key types, in PEM (PKCS#1,
+Supports RSA, DSA, ECDSA (nistp-\*) and ED25519 key types, in PEM (PKCS#1,
PKCS#8) and OpenSSH formats.
This library has been extracted from
@@ -111,7 +111,7 @@ Usage
## Public keys
-### `parseKey(data[, format = 'auto'[, name]])`
+### `parseKey(data[, format = 'auto'[, options]])`
Parses a key from a given data format and returns a new `Key` object.
@@ -124,10 +124,14 @@ Parameters
- `ssh`: standard OpenSSH format,
- `pkcs1`, `pkcs8`: variants of `pem`
- `rfc4253`: raw OpenSSH wire format
- - `openssh`: new post-OpenSSH 6.5 internal format, produced by
+ - `openssh`: new post-OpenSSH 6.5 internal format, produced by
`ssh-keygen -o`
-- `name` -- Optional name for the key being parsed (eg. the filename that
- was opened). Used to generate Error messages
+- `options` -- Optional Object, extra options, with keys:
+ - `filename` -- Optional String, name for the key being parsed
+ (eg. the filename that was opened). Used to generate
+ Error messages
+ - `passphrase` -- Optional String, encryption passphrase used to decrypt an
+ encrypted PEM file
### `Key.isKey(obj)`
@@ -212,7 +216,7 @@ to call this function on other keys will yield an `Error`.
## Private keys
-### `parsePrivateKey(data[, format = 'auto'[, name]])`
+### `parsePrivateKey(data[, format = 'auto'[, options]])`
Parses a private key from a given data format and returns a new
`PrivateKey` object.
@@ -223,12 +227,16 @@ Parameters
- `format` -- String name of format to use, valid options are:
- `auto`: choose automatically from all below
- `pem`: supports both PKCS#1 and PKCS#8
- - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by
+ - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by
`ssh-keygen -o`
- `pkcs1`, `pkcs8`: variants of `pem`
- `rfc4253`: raw OpenSSH wire format
-- `name` -- Optional name for the key being parsed (eg. the filename that
- was opened). Used to generate Error messages
+- `options` -- Optional Object, extra options, with keys:
+ - `filename` -- Optional String, name for the key being parsed
+ (eg. the filename that was opened). Used to generate
+ Error messages
+ - `passphrase` -- Optional String, encryption passphrase used to decrypt an
+ encrypted PEM file
### `PrivateKey.isPrivateKey(obj)`
@@ -261,7 +269,7 @@ a Buffer.
Parameters
-- `format` -- String name of format to use, valid options are listed under
+- `format` -- String name of format to use, valid options are listed under
`parsePrivateKey`. Note that ED25519 keys default to `openssh`
format instead (as they have no `pkcs1` representation).
@@ -393,6 +401,206 @@ Parameters
Same as `this.toBuffer(format).toString('base64')`.
+## Certificates
+
+`sshpk` includes basic support for parsing certificates in X.509 (PEM) format
+and the OpenSSH certificate format. This feature is intended to be used mainly
+to access basic metadata about certificates, extract public keys from them, and
+also to generate simple self-signed certificates from an existing key.
+
+Notably, there is no implementation of CA chain-of-trust verification, and no
+support for key usage restrictions (or other kinds of restrictions). Please do
+the security world a favour, and DO NOT use this code for certificate
+verification in the traditional X.509 CA chain style.
+
+### `parseCertificate(data, format)`
+
+Parameters
+
+ - `data` -- a Buffer or String
+ - `format` -- a String, format to use, one of `'openssh'`, `'pem'` (X.509 in a
+ PEM wrapper), or `'x509'` (raw DER encoded)
+
+### `createSelfSignedCertificate(subject, privateKey[, options])`
+
+Parameters
+
+ - `subject` -- an Identity, the subject of the certificate
+ - `privateKey` -- a PrivateKey, the key of the subject: will be used both to be
+ placed in the certificate and also to sign it (since this is
+ a self-signed certificate)
+ - `options` -- optional Object, with keys:
+ - `lifetime` -- optional Number, lifetime of the certificate from now in
+ seconds
+ - `validFrom`, `validUntil` -- optional Dates, beginning and end of
+ certificate validity period. If given
+ `lifetime` will be ignored
+ - `serial` -- optional Buffer, the serial number of the certificate
+
+### `createCertificate(subject, key, issuer, issuerKey[, options])`
+
+Parameters
+
+ - `subject` -- an Identity, the subject of the certificate
+ - `key` -- a Key, the public key of the subject
+ - `issuer` -- an Identity, the issuer of the certificate who will sign it
+ - `issuerKey` -- a PrivateKey, the issuer's private key for signing
+ - `options` -- optional Object, with keys:
+ - `lifetime` -- optional Number, lifetime of the certificate from now in
+ seconds
+ - `validFrom`, `validUntil` -- optional Dates, beginning and end of
+ certificate validity period. If given
+ `lifetime` will be ignored
+ - `serial` -- optional Buffer, the serial number of the certificate
+
+### `Certificate#subjects`
+
+Array of `Identity` instances describing the subject of this certificate.
+
+### `Certificate#issuer`
+
+The `Identity` of the Certificate's issuer (signer).
+
+### `Certificate#subjectKey`
+
+The public key of the subject of the certificate, as a `Key` instance.
+
+### `Certificate#issuerKey`
+
+The public key of the signing issuer of this certificate, as a `Key` instance.
+May be `undefined` if the issuer's key is unknown (e.g. on an X509 certificate).
+
+### `Certificate#serial`
+
+The serial number of the certificate. As this is normally a 64-bit or wider
+integer, it is returned as a Buffer.
+
+### `Certificate#isExpired([when])`
+
+Tests whether the Certificate is currently expired (i.e. the `validFrom` and
+`validUntil` dates specify a range of time that does not include the current
+time).
+
+Parameters
+
+ - `when` -- optional Date, if specified, tests whether the Certificate was or
+ will be expired at the specified time instead of now
+
+Returns a Boolean.
+
+### `Certificate#isSignedByKey(key)`
+
+Tests whether the Certificate was validly signed by the given (public) Key.
+
+Parameters
+
+ - `key` -- a Key instance
+
+Returns a Boolean.
+
+### `Certificate#isSignedBy(certificate)`
+
+Tests whether this Certificate was validly signed by the subject of the given
+certificate. Also tests that the issuer Identity of this Certificate and the
+subject Identity of the other Certificate are equivalent.
+
+Parameters
+
+ - `certificate` -- another Certificate instance
+
+Returns a Boolean.
+
+### `Certificate#fingerprint([hashAlgo])`
+
+Returns the X509-style fingerprint of the entire certificate (as a Fingerprint
+instance). This matches what a web-browser or similar would display as the
+certificate fingerprint and should not be confused with the fingerprint of the
+subject's public key.
+
+Parameters
+
+ - `hashAlgo` -- an optional String, any hash function name
+
+### `Certificate#toBuffer([format])`
+
+Serializes the Certificate to a Buffer and returns it.
+
+Parameters
+
+ - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or
+ `'x509'`. Defaults to `'x509'`.
+
+Returns a Buffer.
+
+### `Certificate#toString([format])`
+
+ - `format` -- an optional String, output format, one of `'openssh'`, `'pem'` or
+ `'x509'`. Defaults to `'pem'`.
+
+Returns a String.
+
+## Certificate identities
+
+### `identityForHost(hostname)`
+
+Constructs a host-type Identity for a given hostname.
+
+Parameters
+
+ - `hostname` -- the fully qualified DNS name of the host
+
+Returns an Identity instance.
+
+### `identityForUser(uid)`
+
+Constructs a user-type Identity for a given UID.
+
+Parameters
+
+ - `uid` -- a String, user identifier (login name)
+
+Returns an Identity instance.
+
+### `identityForEmail(email)`
+
+Constructs an email-type Identity for a given email address.
+
+Parameters
+
+ - `email` -- a String, email address
+
+Returns an Identity instance.
+
+### `identityFromDN(dn)`
+
+Parses an LDAP-style DN string (e.g. `'CN=foo, C=US'`) and turns it into an
+Identity instance.
+
+Parameters
+
+ - `dn` -- a String
+
+Returns an Identity instance.
+
+### `Identity#toString()`
+
+Returns the identity as an LDAP-style DN string.
+e.g. `'CN=foo, O=bar corp, C=us'`
+
+### `Identity#type`
+
+The type of identity. One of `'host'`, `'user'`, `'email'` or `'unknown'`
+
+### `Identity#hostname`
+### `Identity#uid`
+### `Identity#email`
+
+Set when `type` is `'host'`, `'user'`, or `'email'`, respectively. Strings.
+
+### `Identity#cn`
+
+The value of the first `CN=` in the DN, if any.
+
Errors
------
@@ -425,8 +633,30 @@ The key data given could not be parsed as a valid key.
Properties
-- `keyName` -- `name` that was given to `Key#parse`
+- `keyName` -- `filename` that was given to `parseKey`
+- `format` -- the `format` that was trying to parse the key (see `parseKey`)
+- `innerErr` -- the inner Error thrown by the format parser
+
+### `KeyEncryptedError`
+
+The key is encrypted with a symmetric key (ie, it is password protected). The
+parsing operation would succeed if it was given the `passphrase` option.
+
+Properties
+
+- `keyName` -- `filename` that was given to `parseKey`
+- `format` -- the `format` that was trying to parse the key (currently can only
+ be `"pem"`)
+
+### `CertificateParseError`
+
+The certificate data given could not be parsed as a valid certificate.
+
+Properties
+
+- `certName` -- `filename` that was given to `parseCertificate`
- `format` -- the `format` that was trying to parse the key
+ (see `parseCertificate`)
- `innerErr` -- the inner Error thrown by the format parser
Friends of sshpk
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv
index 8eec411ffb..a1205a45d5 100755
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv
@@ -7,6 +7,9 @@ var dashdash = require('dashdash');
var sshpk = require('../lib/index');
var fs = require('fs');
var path = require('path');
+var tty = require('tty');
+var readline = require('readline');
+var getPassword = require('getpass').getPass;
var options = [
{
@@ -131,7 +134,9 @@ if (require.main === module) {
while ((data = inFile.read()))
bufs.push(data);
});
- inFile.on('end', function () {
+ var parseOpts = {};
+ parseOpts.filename = inFileName;
+ inFile.on('end', function processKey() {
var buf = Buffer.concat(bufs);
var fmt = 'auto';
if (opts.informat)
@@ -140,8 +145,15 @@ if (require.main === module) {
if (opts.private)
f = sshpk.parsePrivateKey;
try {
- var key = f(buf, fmt, inFileName);
+ var key = f(buf, fmt, parseOpts);
} catch (e) {
+ if (e.name === 'KeyEncryptedError') {
+ getPassword(function (err, pw) {
+ parseOpts.passphrase = pw;
+ processKey();
+ });
+ return;
+ }
console.error('sshpk-conv: ' +
e.name + ': ' + e.message);
process.exit(1);
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign
index c8b91932aa..673fc98642 100755
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-sign
@@ -7,6 +7,7 @@ var dashdash = require('dashdash');
var sshpk = require('../lib/index');
var fs = require('fs');
var path = require('path');
+var getPassword = require('getpass').getPass;
var options = [
{
@@ -51,6 +52,8 @@ var options = [
}
];
+var parseOpts = {};
+
if (require.main === module) {
var parser = dashdash.createParser({
options: options
@@ -79,11 +82,23 @@ if (require.main === module) {
}
var keyData = fs.readFileSync(opts.identity);
+ parseOpts.filename = opts.identity;
+
+ run();
+}
+function run() {
var key;
try {
- key = sshpk.parsePrivateKey(keyData);
+ key = sshpk.parsePrivateKey(keyData, 'auto', parseOpts);
} catch (e) {
+ if (e.name === 'KeyEncryptedError') {
+ getPassword(function (err, pw) {
+ parseOpts.passphrase = pw;
+ run();
+ });
+ return;
+ }
console.error('sshpk-sign: error loading private key "' +
opts.identity + '": ' + e.name + ': ' + e.message);
process.exit(1);
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/certificate.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/certificate.js
new file mode 100644
index 0000000000..4fbe6abad4
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/certificate.js
@@ -0,0 +1,291 @@
+// Copyright 2016 Joyent, Inc.
+
+module.exports = Certificate;
+
+var assert = require('assert-plus');
+var algs = require('./algs');
+var crypto = require('crypto');
+var Fingerprint = require('./fingerprint');
+var Signature = require('./signature');
+var errs = require('./errors');
+var util = require('util');
+var utils = require('./utils');
+var Key = require('./key');
+var PrivateKey = require('./private-key');
+var Identity = require('./identity');
+
+var formats = {};
+formats['openssh'] = require('./formats/openssh-cert');
+formats['x509'] = require('./formats/x509');
+formats['pem'] = require('./formats/x509-pem');
+
+var CertificateParseError = errs.CertificateParseError;
+var InvalidAlgorithmError = errs.InvalidAlgorithmError;
+
+function Certificate(opts) {
+ assert.object(opts, 'options');
+ assert.arrayOfObject(opts.subjects, 'options.subjects');
+ utils.assertCompatible(opts.subjects[0], Identity, [1, 0],
+ 'options.subjects');
+ utils.assertCompatible(opts.subjectKey, Key, [1, 0],
+ 'options.subjectKey');
+ utils.assertCompatible(opts.issuer, Identity, [1, 0], 'options.issuer');
+ if (opts.issuerKey !== undefined) {
+ utils.assertCompatible(opts.issuerKey, Key, [1, 0],
+ 'options.issuerKey');
+ }
+ assert.object(opts.signatures, 'options.signatures');
+ assert.buffer(opts.serial, 'options.serial');
+ assert.date(opts.validFrom, 'options.validFrom');
+ assert.date(opts.validUntil, 'optons.validUntil');
+
+ this._hashCache = {};
+
+ this.subjects = opts.subjects;
+ this.issuer = opts.issuer;
+ this.subjectKey = opts.subjectKey;
+ this.issuerKey = opts.issuerKey;
+ this.signatures = opts.signatures;
+ this.serial = opts.serial;
+ this.validFrom = opts.validFrom;
+ this.validUntil = opts.validUntil;
+}
+
+Certificate.formats = formats;
+
+Certificate.prototype.toBuffer = function (format, options) {
+ if (format === undefined)
+ format = 'x509';
+ assert.string(format, 'format');
+ assert.object(formats[format], 'formats[format]');
+ assert.optionalObject(options, 'options');
+
+ return (formats[format].write(this, options));
+};
+
+Certificate.prototype.toString = function (format, options) {
+ if (format === undefined)
+ format = 'pem';
+ return (this.toBuffer(format, options).toString());
+};
+
+Certificate.prototype.fingerprint = function (algo) {
+ if (algo === undefined)
+ algo = 'sha256';
+ assert.string(algo, 'algorithm');
+ var opts = {
+ type: 'certificate',
+ hash: this.hash(algo),
+ algorithm: algo
+ };
+ return (new Fingerprint(opts));
+};
+
+Certificate.prototype.hash = function (algo) {
+ assert.string(algo, 'algorithm');
+ algo = algo.toLowerCase();
+ if (algs.hashAlgs[algo] === undefined)
+ throw (new InvalidAlgorithmError(algo));
+
+ if (this._hashCache[algo])
+ return (this._hashCache[algo]);
+
+ var hash = crypto.createHash(algo).
+ update(this.toBuffer('x509')).digest();
+ this._hashCache[algo] = hash;
+ return (hash);
+};
+
+Certificate.prototype.isExpired = function (when) {
+ if (when === undefined)
+ when = new Date();
+ return (!((when.getTime() >= this.validFrom.getTime()) &&
+ (when.getTime() < this.validUntil.getTime())));
+};
+
+Certificate.prototype.isSignedBy = function (issuerCert) {
+ utils.assertCompatible(issuerCert, Certificate, [1, 0], 'issuer');
+
+ if (!this.issuer.equals(issuerCert.subjects[0]))
+ return (false);
+
+ return (this.isSignedByKey(issuerCert.subjectKey));
+};
+
+Certificate.prototype.isSignedByKey = function (issuerKey) {
+ utils.assertCompatible(issuerKey, Key, [1, 2], 'issuerKey');
+
+ if (this.issuerKey !== undefined) {
+ return (this.issuerKey.
+ fingerprint('sha512').matches(issuerKey));
+ }
+
+ var fmt = Object.keys(this.signatures)[0];
+ var valid = formats[fmt].verify(this, issuerKey);
+ if (valid)
+ this.issuerKey = issuerKey;
+ return (valid);
+};
+
+Certificate.prototype.signWith = function (key) {
+ utils.assertCompatible(key, PrivateKey, [1, 2], 'key');
+ var fmts = Object.keys(formats);
+ var didOne = false;
+ for (var i = 0; i < fmts.length; ++i) {
+ if (fmts[i] !== 'pem') {
+ var ret = formats[fmts[i]].sign(this, key);
+ if (ret === true)
+ didOne = true;
+ }
+ }
+ if (!didOne) {
+ throw (new Error('Failed to sign the certificate for any ' +
+ 'available certificate formats'));
+ }
+};
+
+Certificate.createSelfSigned = function (subjectOrSubjects, key, options) {
+ var subjects;
+ if (Array.isArray(subjectOrSubjects))
+ subjects = subjectOrSubjects;
+ else
+ subjects = [subjectOrSubjects];
+
+ assert.arrayOfObject(subjects);
+ subjects.forEach(function (subject) {
+ utils.assertCompatible(subject, Identity, [1, 0], 'subject');
+ });
+
+ utils.assertCompatible(key, PrivateKey, [1, 2], 'private key');
+
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalObject(options.validFrom, 'options.validFrom');
+ assert.optionalObject(options.validUntil, 'options.validUntil');
+ var validFrom = options.validFrom;
+ var validUntil = options.validUntil;
+ if (validFrom === undefined)
+ validFrom = new Date();
+ if (validUntil === undefined) {
+ assert.optionalNumber(options.lifetime, 'options.lifetime');
+ var lifetime = options.lifetime;
+ if (lifetime === undefined)
+ lifetime = 10*365*24*3600;
+ validUntil = new Date();
+ validUntil.setTime(validUntil.getTime() + lifetime*1000);
+ }
+ assert.optionalBuffer(options.serial, 'options.serial');
+ var serial = options.serial;
+ if (serial === undefined)
+ serial = new Buffer('0000000000000001', 'hex');
+
+ var cert = new Certificate({
+ subjects: subjects,
+ issuer: subjects[0],
+ subjectKey: key.toPublic(),
+ issuerKey: key.toPublic(),
+ signatures: {},
+ serial: serial,
+ validFrom: validFrom,
+ validUntil: validUntil
+ });
+ cert.signWith(key);
+
+ return (cert);
+};
+
+Certificate.create =
+ function (subjectOrSubjects, key, issuer, issuerKey, options) {
+ var subjects;
+ if (Array.isArray(subjectOrSubjects))
+ subjects = subjectOrSubjects;
+ else
+ subjects = [subjectOrSubjects];
+
+ assert.arrayOfObject(subjects);
+ subjects.forEach(function (subject) {
+ utils.assertCompatible(subject, Identity, [1, 0], 'subject');
+ });
+
+ utils.assertCompatible(key, Key, [1, 0], 'key');
+ if (PrivateKey.isPrivateKey(key))
+ key = key.toPublic();
+ utils.assertCompatible(issuer, Identity, [1, 0], 'issuer');
+ utils.assertCompatible(issuerKey, PrivateKey, [1, 2], 'issuer key');
+
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalObject(options.validFrom, 'options.validFrom');
+ assert.optionalObject(options.validUntil, 'options.validUntil');
+ var validFrom = options.validFrom;
+ var validUntil = options.validUntil;
+ if (validFrom === undefined)
+ validFrom = new Date();
+ if (validUntil === undefined) {
+ assert.optionalNumber(options.lifetime, 'options.lifetime');
+ var lifetime = options.lifetime;
+ if (lifetime === undefined)
+ lifetime = 10*365*24*3600;
+ validUntil = new Date();
+ validUntil.setTime(validUntil.getTime() + lifetime*1000);
+ }
+ assert.optionalBuffer(options.serial, 'options.serial');
+ var serial = options.serial;
+ if (serial === undefined)
+ serial = new Buffer('0000000000000001', 'hex');
+
+ var cert = new Certificate({
+ subjects: subjects,
+ issuer: issuer,
+ subjectKey: key,
+ issuerKey: issuerKey.toPublic(),
+ signatures: {},
+ serial: serial,
+ validFrom: validFrom,
+ validUntil: validUntil
+ });
+ cert.signWith(issuerKey);
+
+ return (cert);
+};
+
+Certificate.parse = function (data, format, options) {
+ if (typeof (data) !== 'string')
+ assert.buffer(data, 'data');
+ if (format === undefined)
+ format = 'auto';
+ assert.string(format, 'format');
+ if (typeof (options) === 'string')
+ options = { filename: options };
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalString(options.filename, 'options.filename');
+ if (options.filename === undefined)
+ options.filename = '(unnamed)';
+
+ assert.object(formats[format], 'formats[format]');
+
+ try {
+ var k = formats[format].read(data, options);
+ return (k);
+ } catch (e) {
+ throw (new CertificateParseError(options.filename, format, e));
+ }
+};
+
+Certificate.isCertificate = function (obj, ver) {
+ return (utils.isCompatible(obj, Certificate, ver));
+};
+
+/*
+ * API versions for Certificate:
+ * [1,0] -- initial ver
+ */
+Certificate.prototype._sshpkApiVersion = [1, 0];
+
+Certificate._oldVersionDetect = function (obj) {
+ return ([1, 0]);
+};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js
index 3551c1071e..1cc09ec71d 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/errors.js
@@ -50,9 +50,35 @@ function SignatureParseError(type, format, innerErr) {
}
util.inherits(SignatureParseError, Error);
+function CertificateParseError(name, format, innerErr) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, CertificateParseError);
+ this.name = 'CertificateParseError';
+ this.format = format;
+ this.certName = name;
+ this.innerErr = innerErr;
+ this.message = 'Failed to parse ' + name + ' as a valid ' + format +
+ ' format certificate: ' + innerErr.message;
+}
+util.inherits(CertificateParseError, Error);
+
+function KeyEncryptedError(name, format) {
+ if (Error.captureStackTrace)
+ Error.captureStackTrace(this, KeyEncryptedError);
+ this.name = 'KeyEncryptedError';
+ this.format = format;
+ this.keyName = name;
+ this.message = 'The ' + format + ' format key ' + name + ' is ' +
+ 'encrypted (password-protected), and no passphrase was ' +
+ 'provided in `options`';
+}
+util.inherits(KeyEncryptedError, Error);
+
module.exports = {
FingerprintFormatError: FingerprintFormatError,
InvalidAlgorithmError: InvalidAlgorithmError,
KeyParseError: KeyParseError,
- SignatureParseError: SignatureParseError
+ SignatureParseError: SignatureParseError,
+ KeyEncryptedError: KeyEncryptedError,
+ CertificateParseError: CertificateParseError
};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js
index c607330e7f..7ed7e51304 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/fingerprint.js
@@ -7,6 +7,7 @@ var algs = require('./algs');
var crypto = require('crypto');
var errs = require('./errors');
var Key = require('./key');
+var Certificate = require('./certificate');
var utils = require('./utils');
var FingerprintFormatError = errs.FingerprintFormatError;
@@ -14,6 +15,7 @@ var InvalidAlgorithmError = errs.InvalidAlgorithmError;
function Fingerprint(opts) {
assert.object(opts, 'options');
+ assert.string(opts.type, 'options.type');
assert.buffer(opts.hash, 'options.hash');
assert.string(opts.algorithm, 'options.algorithm');
@@ -22,6 +24,7 @@ function Fingerprint(opts) {
throw (new InvalidAlgorithmError(this.algorithm));
this.hash = opts.hash;
+ this.type = opts.type;
}
Fingerprint.prototype.toString = function (format) {
@@ -44,11 +47,16 @@ Fingerprint.prototype.toString = function (format) {
}
};
-Fingerprint.prototype.matches = function (key) {
- assert.object(key, 'key');
- utils.assertCompatible(key, Key, [1, 0], 'key');
+Fingerprint.prototype.matches = function (other) {
+ assert.object(other, 'key or certificate');
+ if (this.type === 'key') {
+ utils.assertCompatible(other, Key, [1, 0], 'key');
+ } else {
+ utils.assertCompatible(other, Certificate, [1, 0],
+ 'certificate');
+ }
- var theirHash = key.hash(this.algorithm);
+ var theirHash = other.hash(this.algorithm);
var theirHash2 = crypto.createHash(this.algorithm).
update(theirHash).digest('base64');
@@ -59,10 +67,19 @@ Fingerprint.prototype.matches = function (key) {
return (this.hash2 === theirHash2);
};
-Fingerprint.parse = function (fp, enAlgs) {
+Fingerprint.parse = function (fp, options) {
assert.string(fp, 'fingerprint');
- var alg, hash;
+ var alg, hash, enAlgs;
+ if (Array.isArray(options)) {
+ enAlgs = options;
+ options = {};
+ }
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ if (options.enAlgs !== undefined)
+ enAlgs = options.enAlgs;
assert.optionalArrayOfString(enAlgs, 'algorithms');
var parts = fp.split(':');
@@ -105,7 +122,11 @@ Fingerprint.parse = function (fp, enAlgs) {
throw (new InvalidAlgorithmError(alg));
}
- return (new Fingerprint({algorithm: alg, hash: hash}));
+ return (new Fingerprint({
+ algorithm: alg,
+ hash: hash,
+ type: options.type || 'key'
+ }));
};
function addColons(s) {
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/auto.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/auto.js
index 37c3cc8135..973c03245e 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/auto.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/auto.js
@@ -14,24 +14,24 @@ var pem = require('./pem');
var ssh = require('./ssh');
var rfc4253 = require('./rfc4253');
-function read(buf) {
+function read(buf, options) {
if (typeof (buf) === 'string') {
if (buf.trim().match(/^[-]+[ ]*BEGIN/))
- return (pem.read(buf));
+ return (pem.read(buf, options));
if (buf.match(/^\s*ssh-[a-z]/))
- return (ssh.read(buf));
+ return (ssh.read(buf, options));
if (buf.match(/^\s*ecdsa-/))
- return (ssh.read(buf));
+ return (ssh.read(buf, options));
buf = new Buffer(buf, 'binary');
} else {
assert.buffer(buf);
if (findPEMHeader(buf))
- return (pem.read(buf));
+ return (pem.read(buf, options));
if (findSSHHeader(buf))
- return (ssh.read(buf));
+ return (ssh.read(buf, options));
}
if (buf.readUInt32BE(0) < buf.length)
- return (rfc4253.read(buf));
+ return (rfc4253.read(buf, options));
throw (new Error('Failed to auto-detect format of key'));
}
@@ -68,6 +68,6 @@ function findPEMHeader(buf) {
return (true);
}
-function write(key) {
+function write(key, options) {
throw (new Error('"auto" format cannot be used for writing'));
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/openssh-cert.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/openssh-cert.js
new file mode 100644
index 0000000000..8ce7350fee
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/openssh-cert.js
@@ -0,0 +1,289 @@
+// Copyright 2016 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ verify: verify,
+ sign: sign,
+ write: write,
+
+ /* Internal private API */
+ fromBuffer: fromBuffer,
+ toBuffer: toBuffer
+};
+
+var assert = require('assert-plus');
+var SSHBuffer = require('../ssh-buffer');
+var crypto = require('crypto');
+var algs = require('../algs');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var Identity = require('../identity');
+var rfc4253 = require('./rfc4253');
+var Signature = require('../signature');
+var utils = require('../utils');
+var Certificate = require('../certificate');
+
+function verify(cert, key) {
+ /*
+ * We always give an issuerKey, so if our verify() is being called then
+ * there was no signature. Return false.
+ */
+ return (false);
+}
+
+var TYPES = {
+ 'user': 1,
+ 'host': 2
+};
+Object.keys(TYPES).forEach(function (k) { TYPES[TYPES[k]] = k; });
+
+var ECDSA_ALGO = /^ecdsa-sha2-([^@-]+)-cert-v01@openssh.com$/;
+
+function read(buf, options) {
+ if (Buffer.isBuffer(buf))
+ buf = buf.toString('ascii');
+ var parts = buf.trim().split(/[ \t\n]+/g);
+ if (parts.length < 2 || parts.length > 3)
+ throw (new Error('Not a valid SSH certificate line'));
+
+ var algo = parts[0];
+ var data = parts[1];
+
+ data = new Buffer(data, 'base64');
+ return (fromBuffer(data, algo));
+}
+
+function fromBuffer(data, algo, partial) {
+ var sshbuf = new SSHBuffer({ buffer: data });
+ var innerAlgo = sshbuf.readString();
+ if (algo !== undefined && innerAlgo !== algo)
+ throw (new Error('SSH certificate algorithm mismatch'));
+ if (algo === undefined)
+ algo = innerAlgo;
+
+ var cert = {};
+ cert.signatures = {};
+ cert.signatures.openssh = {};
+
+ cert.signatures.openssh.nonce = sshbuf.readBuffer();
+
+ var key = {};
+ var parts = (key.parts = []);
+ key.type = getAlg(algo);
+
+ var partCount = algs.info[key.type].parts.length;
+ while (parts.length < partCount)
+ parts.push(sshbuf.readPart());
+ assert.ok(parts.length >= 1, 'key must have at least one part');
+
+ var algInfo = algs.info[key.type];
+ if (key.type === 'ecdsa') {
+ var res = ECDSA_ALGO.exec(algo);
+ assert.ok(res !== null);
+ assert.strictEqual(res[1], parts[0].data.toString());
+ }
+
+ for (var i = 0; i < algInfo.parts.length; ++i) {
+ parts[i].name = algInfo.parts[i];
+ if (parts[i].name !== 'curve' &&
+ algInfo.normalize !== false) {
+ var p = parts[i];
+ p.data = utils.mpNormalize(p.data);
+ }
+ }
+
+ cert.subjectKey = new Key(key);
+
+ cert.serial = sshbuf.readInt64();
+
+ var type = TYPES[sshbuf.readInt()];
+ assert.string(type, 'valid cert type');
+
+ cert.signatures.openssh.keyId = sshbuf.readString();
+
+ var principals = [];
+ var pbuf = sshbuf.readBuffer();
+ var psshbuf = new SSHBuffer({ buffer: pbuf });
+ while (!psshbuf.atEnd())
+ principals.push(psshbuf.readString());
+ if (principals.length === 0)
+ principals = ['*'];
+
+ cert.subjects = principals.map(function (pr) {
+ if (type === 'user')
+ return (Identity.forUser(pr));
+ else if (type === 'host')
+ return (Identity.forHost(pr));
+ throw (new Error('Unknown identity type ' + type));
+ });
+
+ cert.validFrom = int64ToDate(sshbuf.readInt64());
+ cert.validUntil = int64ToDate(sshbuf.readInt64());
+
+ cert.signatures.openssh.critical = sshbuf.readBuffer();
+ cert.signatures.openssh.exts = sshbuf.readBuffer();
+
+ /* reserved */
+ sshbuf.readBuffer();
+
+ var signingKeyBuf = sshbuf.readBuffer();
+ cert.issuerKey = rfc4253.read(signingKeyBuf);
+
+ /*
+ * OpenSSH certs don't give the identity of the issuer, just their
+ * public key. So, we use an Identity that matches anything. The
+ * isSignedBy() function will later tell you if the key matches.
+ */
+ cert.issuer = Identity.forHost('**');
+
+ var sigBuf = sshbuf.readBuffer();
+ cert.signatures.openssh.signature =
+ Signature.parse(sigBuf, cert.issuerKey.type, 'ssh');
+
+ if (partial !== undefined) {
+ partial.remainder = sshbuf.remainder();
+ partial.consumed = sshbuf._offset;
+ }
+
+ return (new Certificate(cert));
+}
+
+function int64ToDate(buf) {
+ var i = buf.readUInt32BE(0) * 4294967296;
+ i += buf.readUInt32BE(4);
+ var d = new Date();
+ d.setTime(i * 1000);
+ d.sourceInt64 = buf;
+ return (d);
+}
+
+function dateToInt64(date) {
+ if (date.sourceInt64 !== undefined)
+ return (date.sourceInt64);
+ var i = Math.round(date.getTime() / 1000);
+ var upper = Math.floor(i / 4294967296);
+ var lower = Math.floor(i % 4294967296);
+ var buf = new Buffer(8);
+ buf.writeUInt32BE(upper, 0);
+ buf.writeUInt32BE(lower, 4);
+ return (buf);
+}
+
+function sign(cert, key) {
+ if (cert.signatures.openssh === undefined)
+ cert.signatures.openssh = {};
+ try {
+ var blob = toBuffer(cert, true);
+ } catch (e) {
+ delete (cert.signatures.openssh);
+ return (false);
+ }
+ var sig = cert.signatures.openssh;
+ var hashAlgo = undefined;
+ if (key.type === 'rsa' || key.type === 'dsa')
+ hashAlgo = 'sha1';
+ var signer = key.createSign(hashAlgo);
+ signer.write(blob);
+ sig.signature = signer.sign();
+ return (true);
+}
+
+function write(cert, options) {
+ if (options === undefined)
+ options = {};
+
+ var blob = toBuffer(cert);
+ var out = getCertType(cert.subjectKey) + ' ' + blob.toString('base64');
+ if (options.comment)
+ out = out + ' ' + options.comment;
+ return (out);
+}
+
+
+function toBuffer(cert, noSig) {
+ assert.object(cert.signatures.openssh, 'signature for openssh format');
+ var sig = cert.signatures.openssh;
+
+ if (sig.nonce === undefined)
+ sig.nonce = crypto.randomBytes(16);
+ var buf = new SSHBuffer({});
+ buf.writeString(getCertType(cert.subjectKey));
+ buf.writeBuffer(sig.nonce);
+
+ var key = cert.subjectKey;
+ var algInfo = algs.info[key.type];
+ algInfo.parts.forEach(function (part) {
+ buf.writePart(key.part[part]);
+ });
+
+ buf.writeInt64(cert.serial);
+
+ var type = cert.subjects[0].type;
+ assert.notStrictEqual(type, 'unknown');
+ cert.subjects.forEach(function (id) {
+ assert.strictEqual(id.type, type);
+ });
+ type = TYPES[type];
+ buf.writeInt(type);
+
+ if (sig.keyId === undefined) {
+ sig.keyId = cert.subjects[0].type + '_' +
+ (cert.subjects[0].uid || cert.subjects[0].hostname);
+ }
+ buf.writeString(sig.keyId);
+
+ var sub = new SSHBuffer({});
+ cert.subjects.forEach(function (id) {
+ if (type === TYPES.host)
+ sub.writeString(id.hostname);
+ else if (type === TYPES.user)
+ sub.writeString(id.uid);
+ });
+ buf.writeBuffer(sub.toBuffer());
+
+ buf.writeInt64(dateToInt64(cert.validFrom));
+ buf.writeInt64(dateToInt64(cert.validUntil));
+
+ if (sig.critical === undefined)
+ sig.critical = new Buffer(0);
+ buf.writeBuffer(sig.critical);
+
+ if (sig.exts === undefined)
+ sig.exts = new Buffer(0);
+ buf.writeBuffer(sig.exts);
+
+ /* reserved */
+ buf.writeBuffer(new Buffer(0));
+
+ sub = rfc4253.write(cert.issuerKey);
+ buf.writeBuffer(sub);
+
+ if (!noSig)
+ buf.writeBuffer(sig.signature.toBuffer('ssh'));
+
+ return (buf.toBuffer());
+}
+
+function getAlg(certType) {
+ if (certType === 'ssh-rsa-cert-v01@openssh.com')
+ return ('rsa');
+ if (certType === 'ssh-dss-cert-v01@openssh.com')
+ return ('dsa');
+ if (certType.match(ECDSA_ALGO))
+ return ('ecdsa');
+ if (certType === 'ssh-ed25519-cert-v01@openssh.com')
+ return ('ed25519');
+ throw (new Error('Unsupported cert type ' + certType));
+}
+
+function getCertType(key) {
+ if (key.type === 'rsa')
+ return ('ssh-rsa-cert-v01@openssh.com');
+ if (key.type === 'dsa')
+ return ('ssh-dss-cert-v01@openssh.com');
+ if (key.type === 'ecdsa')
+ return ('ecdsa-sha2-' + key.curve + '-cert-v01@openssh.com');
+ if (key.type === 'ed25519')
+ return ('ssh-ed25519-cert-v01@openssh.com');
+ throw (new Error('Unsupported key type ' + key.type));
+}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js
index 1d907607e2..5318b35165 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pem.js
@@ -7,6 +7,7 @@ module.exports = {
var assert = require('assert-plus');
var asn1 = require('asn1');
+var crypto = require('crypto');
var algs = require('../algs');
var utils = require('../utils');
var Key = require('../key');
@@ -17,11 +18,13 @@ var pkcs8 = require('./pkcs8');
var sshpriv = require('./ssh-private');
var rfc4253 = require('./rfc4253');
+var errors = require('../errors');
+
/*
* For reading we support both PKCS#1 and PKCS#8. If we find a private key,
* we just take the public component of it and use that.
*/
-function read(buf, forceType) {
+function read(buf, options, forceType) {
var input = buf;
if (typeof (buf) !== 'string') {
assert.buffer(buf, 'buf');
@@ -58,12 +61,26 @@ function read(buf, forceType) {
break;
headers[m[1].toLowerCase()] = m[2];
}
+
+ var cipher, key, iv;
if (headers['proc-type']) {
var parts = headers['proc-type'].split(',');
if (parts[0] === '4' && parts[1] === 'ENCRYPTED') {
- throw (new Error('PEM key is encrypted ' +
- '(password-protected). Please use the ' +
- 'SSH agent or decrypt the key.'));
+ if (typeof (options.passphrase) === 'string') {
+ options.passphrase = new Buffer(
+ options.passphrase, 'utf-8');
+ }
+ if (!Buffer.isBuffer(options.passphrase)) {
+ throw (new errors.KeyEncryptedError(
+ options.filename, 'PEM'));
+ } else {
+ parts = headers['dek-info'].split(',');
+ assert.ok(parts.length === 2);
+ cipher = parts[0].toLowerCase();
+ iv = new Buffer(parts[1], 'hex');
+ key = utils.opensslKeyDeriv(cipher, iv,
+ options.passphrase, 1).key;
+ }
}
}
@@ -71,6 +88,23 @@ function read(buf, forceType) {
lines = lines.slice(0, -1).join('');
buf = new Buffer(lines, 'base64');
+ if (cipher && key && iv) {
+ var cipherStream = crypto.createDecipheriv(cipher, key, iv);
+ var chunk, chunks = [];
+ cipherStream.once('error', function (e) {
+ if (e.toString().indexOf('bad decrypt') !== -1) {
+ throw (new Error('Incorrect passphrase ' +
+ 'supplied, could not decrypt key'));
+ }
+ throw (e);
+ });
+ cipherStream.write(buf);
+ cipherStream.end();
+ while ((chunk = cipherStream.read()) !== null)
+ chunks.push(chunk);
+ buf = Buffer.concat(chunks);
+ }
+
/* The new OpenSSH internal format abuses PEM headers */
if (alg && alg.toLowerCase() === 'openssh')
return (sshpriv.readSSHPrivate(type, buf));
@@ -98,7 +132,7 @@ function read(buf, forceType) {
}
}
-function write(key, type) {
+function write(key, options, type) {
assert.object(key);
var alg = {'ecdsa': 'EC', 'rsa': 'RSA', 'dsa': 'DSA'}[key.type];
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs1.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs1.js
index 6f9a24f115..a5676af6ef 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs1.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs1.js
@@ -19,12 +19,12 @@ var pem = require('./pem');
var pkcs8 = require('./pkcs8');
var readECDSACurve = pkcs8.readECDSACurve;
-function read(buf) {
- return (pem.read(buf, 'pkcs1'));
+function read(buf, options) {
+ return (pem.read(buf, options, 'pkcs1'));
}
-function write(key) {
- return (pem.write(key, 'pkcs1'));
+function write(key, options) {
+ return (pem.write(key, options, 'pkcs1'));
}
/* Helper to read in a single mpint */
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js
index c57c85537a..4ccbefcbec 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/pkcs8.js
@@ -18,12 +18,12 @@ var Key = require('../key');
var PrivateKey = require('../private-key');
var pem = require('./pem');
-function read(buf) {
- return (pem.read(buf, 'pkcs8'));
+function read(buf, options) {
+ return (pem.read(buf, options, 'pkcs8'));
}
-function write(key) {
- return (pem.write(key, 'pkcs8'));
+function write(key, options) {
+ return (pem.write(key, options, 'pkcs8'));
}
/* Helper to read in a single mpint */
@@ -42,10 +42,12 @@ function readPkcs8(alg, type, der) {
}
der.readSequence();
+ var next = der.offset + der.length;
var oid = der.readOID();
switch (oid) {
case '1.2.840.113549.1.1.1':
+ der._offset = next;
if (type === 'public')
return (readPkcs8RSAPublic(der));
else
@@ -66,10 +68,6 @@ function readPkcs8(alg, type, der) {
}
function readPkcs8RSAPublic(der) {
- // Null -- XXX this probably isn't good practice
- der.readByte();
- der.readByte();
-
// bit string sequence
der.readSequence(asn1.Ber.BitString);
der.readByte();
@@ -93,9 +91,6 @@ function readPkcs8RSAPublic(der) {
}
function readPkcs8RSAPrivate(der) {
- der.readByte();
- der.readByte();
-
der.readSequence(asn1.Ber.OctetString);
der.readSequence();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/rfc4253.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/rfc4253.js
index 3e0e286cde..9d436dd921 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/rfc4253.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/rfc4253.js
@@ -52,7 +52,7 @@ function keyTypeToAlg(key) {
throw (new Error('Unknown key type ' + key.type));
}
-function read(partial, type, buf) {
+function read(partial, type, buf, options) {
if (typeof (buf) === 'string')
buf = new Buffer(buf);
assert.buffer(buf, 'buf');
@@ -120,7 +120,7 @@ function read(partial, type, buf) {
return (new Constructor(key));
}
-function write(key) {
+function write(key, options) {
assert.object(key);
var alg = keyTypeToAlg(key);
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js
index 02d7c27e8f..bfbdab527f 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh-private.js
@@ -18,8 +18,8 @@ var pem = require('./pem');
var rfc4253 = require('./rfc4253');
var SSHBuffer = require('../ssh-buffer');
-function read(buf) {
- return (pem.read(buf));
+function read(buf, options) {
+ return (pem.read(buf, options));
}
var MAGIC = 'openssh-key-v1';
@@ -76,7 +76,7 @@ function readSSHPrivate(type, buf) {
return (key);
}
-function write(key) {
+function write(key, options) {
var pubKey;
if (PrivateKey.isPrivateKey(key))
pubKey = key.toPublic();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh.js
index f7baa48cfe..655c9eaf3b 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/ssh.js
@@ -18,7 +18,7 @@ var SSHKEY_RE = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([\n \t]+([^\n]+))?$/;
/*JSSTYLED*/
var SSHKEY_RE2 = /^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/ \t\n]+[=]*)(.*)$/;
-function read(buf) {
+function read(buf, options) {
if (typeof (buf) !== 'string') {
assert.buffer(buf, 'buf');
buf = buf.toString('ascii');
@@ -95,7 +95,7 @@ function read(buf) {
return (key);
}
-function write(key) {
+function write(key, options) {
assert.object(key);
if (!Key.isKey(key))
throw (new Error('Must be a public key'));
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509-pem.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509-pem.js
new file mode 100644
index 0000000000..c59c7d5ff0
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509-pem.js
@@ -0,0 +1,77 @@
+// Copyright 2016 Joyent, Inc.
+
+var x509 = require('./x509');
+
+module.exports = {
+ read: read,
+ verify: x509.verify,
+ sign: x509.sign,
+ write: write
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var algs = require('../algs');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var pem = require('./pem');
+var Identity = require('../identity');
+var Signature = require('../signature');
+var Certificate = require('../certificate');
+
+function read(buf, options) {
+ if (typeof (buf) !== 'string') {
+ assert.buffer(buf, 'buf');
+ buf = buf.toString('ascii');
+ }
+
+ var lines = buf.trim().split(/[\r\n]+/g);
+
+ var m = lines[0].match(/*JSSTYLED*/
+ /[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/);
+ assert.ok(m, 'invalid PEM header');
+
+ var m2 = lines[lines.length - 1].match(/*JSSTYLED*/
+ /[-]+[ ]*END CERTIFICATE[ ]*[-]+/);
+ assert.ok(m2, 'invalid PEM footer');
+
+ var headers = {};
+ while (true) {
+ lines = lines.slice(1);
+ m = lines[0].match(/*JSSTYLED*/
+ /^([A-Za-z0-9-]+): (.+)$/);
+ if (!m)
+ break;
+ headers[m[1].toLowerCase()] = m[2];
+ }
+
+ /* Chop off the first and last lines */
+ lines = lines.slice(0, -1).join('');
+ buf = new Buffer(lines, 'base64');
+
+ return (x509.read(buf, options));
+}
+
+function write(cert, options) {
+ var dbuf = x509.write(cert, options);
+
+ var header = 'CERTIFICATE';
+ var tmp = dbuf.toString('base64');
+ var len = tmp.length + (tmp.length / 64) +
+ 18 + 16 + header.length*2 + 10;
+ var buf = new Buffer(len);
+ var o = 0;
+ o += buf.write('-----BEGIN ' + header + '-----\n', o);
+ for (var i = 0; i < tmp.length; ) {
+ var limit = i + 64;
+ if (limit > tmp.length)
+ limit = tmp.length;
+ o += buf.write(tmp.slice(i, limit), o);
+ buf[o++] = 10;
+ i = limit;
+ }
+ o += buf.write('-----END ' + header + '-----\n', o);
+
+ return (buf.slice(0, o));
+}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509.js
new file mode 100644
index 0000000000..a2975404a5
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/formats/x509.js
@@ -0,0 +1,484 @@
+// Copyright 2016 Joyent, Inc.
+
+module.exports = {
+ read: read,
+ verify: verify,
+ sign: sign,
+ write: write
+};
+
+var assert = require('assert-plus');
+var asn1 = require('asn1');
+var algs = require('../algs');
+var utils = require('../utils');
+var Key = require('../key');
+var PrivateKey = require('../private-key');
+var pem = require('./pem');
+var Identity = require('../identity');
+var Signature = require('../signature');
+var Certificate = require('../certificate');
+var pkcs8 = require('./pkcs8');
+
+/*
+ * This file is based on RFC5280 (X.509).
+ */
+
+/* Helper to read in a single mpint */
+function readMPInt(der, nm) {
+ assert.strictEqual(der.peek(), asn1.Ber.Integer,
+ nm + ' is not an Integer');
+ return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true)));
+}
+
+function verify(cert, key) {
+ var sig = cert.signatures.x509;
+ assert.object(sig, 'x509 signature');
+
+ var algParts = sig.algo.split('-');
+ if (algParts[0] !== key.type)
+ return (false);
+
+ var blob = sig.cache;
+ if (blob === undefined) {
+ var der = new asn1.BerWriter();
+ writeTBSCert(cert, der);
+ blob = der.buffer;
+ }
+
+ var verifier = key.createVerify(algParts[1]);
+ verifier.write(blob);
+ return (verifier.verify(sig.signature));
+}
+
+function Local(i) {
+ return (asn1.Ber.Context | asn1.Ber.Constructor | i);
+}
+
+function Context(i) {
+ return (asn1.Ber.Context | i);
+}
+
+var SIGN_ALGS = {
+ 'rsa-md5': '1.2.840.113549.1.1.4',
+ 'rsa-sha1': '1.2.840.113549.1.1.5',
+ 'rsa-sha256': '1.2.840.113549.1.1.11',
+ 'rsa-sha384': '1.2.840.113549.1.1.12',
+ 'rsa-sha512': '1.2.840.113549.1.1.13',
+ 'dsa-sha1': '1.2.840.10040.4.3',
+ 'dsa-sha256': '2.16.840.1.101.3.4.3.2',
+ 'ecdsa-sha1': '1.2.840.10045.4.1',
+ 'ecdsa-sha256': '1.2.840.10045.4.3.2',
+ 'ecdsa-sha384': '1.2.840.10045.4.3.3',
+ 'ecdsa-sha512': '1.2.840.10045.4.3.4'
+};
+Object.keys(SIGN_ALGS).forEach(function (k) {
+ SIGN_ALGS[SIGN_ALGS[k]] = k;
+});
+SIGN_ALGS['1.3.14.3.2.3'] = 'rsa-md5';
+SIGN_ALGS['1.3.14.3.2.29'] = 'rsa-sha1';
+
+var EXTS = {
+ 'issuerKeyId': '2.5.29.35',
+ 'altName': '2.5.29.17'
+};
+
+function read(buf, options) {
+ if (typeof (buf) === 'string') {
+ buf = new Buffer(buf, 'binary');
+ }
+ assert.buffer(buf, 'buf');
+
+ var der = new asn1.BerReader(buf);
+
+ der.readSequence();
+ if (Math.abs(der.length - der.remain) > 1) {
+ throw (new Error('DER sequence does not contain whole byte ' +
+ 'stream'));
+ }
+
+ var tbsStart = der.offset;
+ der.readSequence();
+ var sigOffset = der.offset + der.length;
+ var tbsEnd = sigOffset;
+
+ if (der.peek() === Local(0)) {
+ der.readSequence(Local(0));
+ var version = der.readInt();
+ assert.ok(version <= 3,
+ 'only x.509 versions up to v3 supported');
+ }
+
+ var cert = {};
+ cert.signatures = {};
+ var sig = (cert.signatures.x509 = {});
+ sig.extras = {};
+
+ cert.serial = readMPInt(der, 'serial');
+
+ der.readSequence();
+ var after = der.offset + der.length;
+ var certAlgOid = der.readOID();
+ var certAlg = SIGN_ALGS[certAlgOid];
+ if (certAlg === undefined)
+ throw (new Error('unknown signature algorithm ' + certAlgOid));
+
+ der._offset = after;
+ cert.issuer = Identity.parseAsn1(der);
+
+ der.readSequence();
+ cert.validFrom = readDate(der);
+ cert.validUntil = readDate(der);
+
+ cert.subjects = [Identity.parseAsn1(der)];
+
+ der.readSequence();
+ after = der.offset + der.length;
+ cert.subjectKey = pkcs8.readPkcs8(undefined, 'public', der);
+ der._offset = after;
+
+ /* issuerUniqueID */
+ if (der.peek() === Local(1)) {
+ der.readSequence(Local(1));
+ sig.extras.issuerUniqueID =
+ buf.slice(der.offset, der.offset + der.length);
+ der._offset += der.length;
+ }
+
+ /* subjectUniqueID */
+ if (der.peek() === Local(2)) {
+ der.readSequence(Local(2));
+ sig.extras.subjectUniqueID =
+ buf.slice(der.offset, der.offset + der.length);
+ der._offset += der.length;
+ }
+
+ /* extensions */
+ if (der.peek() === Local(3)) {
+ der.readSequence(Local(3));
+ var extEnd = der.offset + der.length;
+ der.readSequence();
+
+ while (der.offset < extEnd)
+ readExtension(cert, buf, der);
+
+ assert.strictEqual(der.offset, extEnd);
+ }
+
+ assert.strictEqual(der.offset, sigOffset);
+
+ der.readSequence();
+ after = der.offset + der.length;
+ var sigAlgOid = der.readOID();
+ var sigAlg = SIGN_ALGS[sigAlgOid];
+ if (sigAlg === undefined)
+ throw (new Error('unknown signature algorithm ' + sigAlgOid));
+ der._offset = after;
+
+ var sigData = der.readString(asn1.Ber.BitString, true);
+ if (sigData[0] === 0)
+ sigData = sigData.slice(1);
+ var algParts = sigAlg.split('-');
+
+ sig.signature = Signature.parse(sigData, algParts[0], 'asn1');
+ sig.signature.hashAlgorithm = algParts[1];
+ sig.algo = sigAlg;
+ sig.cache = buf.slice(tbsStart, tbsEnd);
+
+ return (new Certificate(cert));
+}
+
+function readDate(der) {
+ if (der.peek() === asn1.Ber.UTCTime) {
+ return (utcTimeToDate(der.readString(asn1.Ber.UTCTime)));
+ } else if (der.peek() === asn1.Ber.GeneralizedTime) {
+ return (gTimeToDate(der.readString(asn1.Ber.GeneralizedTime)));
+ } else {
+ throw (new Error('Unsupported date format'));
+ }
+}
+
+/* RFC5280, section 4.2.1.6 (GeneralName type) */
+var ALTNAME = {
+ OtherName: Local(0),
+ RFC822Name: Context(1),
+ DNSName: Context(2),
+ X400Address: Local(3),
+ DirectoryName: Local(4),
+ EDIPartyName: Local(5),
+ URI: Context(6),
+ IPAddress: Context(7),
+ OID: Context(8)
+};
+
+function readExtension(cert, buf, der) {
+ der.readSequence();
+ var after = der.offset + der.length;
+ var extId = der.readOID();
+ var id;
+ var sig = cert.signatures.x509;
+ sig.extras.exts = [];
+
+ var critical;
+ if (der.peek() === asn1.Ber.Boolean)
+ critical = der.readBoolean();
+
+ switch (extId) {
+ case (EXTS.altName):
+ der.readSequence(asn1.Ber.OctetString);
+ der.readSequence();
+ var aeEnd = der.offset + der.length;
+ while (der.offset < aeEnd) {
+ switch (der.peek()) {
+ case ALTNAME.OtherName:
+ case ALTNAME.EDIPartyName:
+ der.readSequence();
+ der._offset += der.length;
+ break;
+ case ALTNAME.OID:
+ der.readOID(ALTNAME.OID);
+ break;
+ case ALTNAME.RFC822Name:
+ /* RFC822 specifies email addresses */
+ var email = der.readString(ALTNAME.RFC822Name);
+ id = Identity.forEmail(email);
+ if (!cert.subjects[0].equals(id))
+ cert.subjects.push(id);
+ break;
+ case ALTNAME.DirectoryName:
+ der.readSequence(ALTNAME.DirectoryName);
+ id = Identity.parseAsn1(der);
+ if (!cert.subjects[0].equals(id))
+ cert.subjects.push(id);
+ break;
+ case ALTNAME.DNSName:
+ var host = der.readString(
+ ALTNAME.DNSName);
+ id = Identity.forHost(host);
+ if (!cert.subjects[0].equals(id))
+ cert.subjects.push(id);
+ break;
+ default:
+ der.readString(der.peek());
+ break;
+ }
+ }
+ sig.extras.exts.push({ oid: extId, critical: critical });
+ break;
+ default:
+ sig.extras.exts.push({
+ oid: extId,
+ critical: critical,
+ data: der.readString(asn1.Ber.OctetString, true)
+ });
+ break;
+ }
+
+ der._offset = after;
+}
+
+var UTCTIME_RE =
+ /^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;
+function utcTimeToDate(t) {
+ var m = t.match(UTCTIME_RE);
+ assert.ok(m, 'timestamps must be in UTC');
+ var d = new Date();
+
+ var thisYear = d.getUTCFullYear();
+ var century = Math.floor(thisYear / 100) * 100;
+
+ var year = parseInt(m[1], 10);
+ if (thisYear % 100 < 50 && year >= 60)
+ year += (century - 1);
+ else
+ year += century;
+ d.setUTCFullYear(year, parseInt(m[2], 10) - 1, parseInt(m[3], 10));
+ d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10));
+ if (m[6] && m[6].length > 0)
+ d.setUTCSeconds(parseInt(m[6], 10));
+ return (d);
+}
+
+var GTIME_RE =
+ /^([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})?Z$/;
+function gTimeToDate(t) {
+ var m = t.match(GTIME_RE);
+ assert.ok(m);
+ var d = new Date();
+
+ d.setUTCFullYear(parseInt(m[1], 10), parseInt(m[2], 10) - 1,
+ parseInt(m[3], 10));
+ d.setUTCHours(parseInt(m[4], 10), parseInt(m[5], 10));
+ if (m[6] && m[6].length > 0)
+ d.setUTCSeconds(parseInt(m[6], 10));
+ return (d);
+}
+
+function zeroPad(n) {
+ var s = '' + n;
+ while (s.length < 2)
+ s = '0' + s;
+ return (s);
+}
+
+function dateToUTCTime(d) {
+ var s = '';
+ s += zeroPad(d.getUTCFullYear() % 100);
+ s += zeroPad(d.getUTCMonth() + 1);
+ s += zeroPad(d.getUTCDate());
+ s += zeroPad(d.getUTCHours());
+ s += zeroPad(d.getUTCMinutes());
+ s += zeroPad(d.getUTCSeconds());
+ s += 'Z';
+ return (s);
+}
+
+function sign(cert, key) {
+ if (cert.signatures.x509 === undefined)
+ cert.signatures.x509 = {};
+ var sig = cert.signatures.x509;
+
+ sig.algo = key.type + '-' + key.defaultHashAlgorithm();
+ if (SIGN_ALGS[sig.algo] === undefined)
+ return (false);
+
+ var der = new asn1.BerWriter();
+ writeTBSCert(cert, der);
+ var blob = der.buffer;
+ sig.cache = blob;
+
+ var signer = key.createSign();
+ signer.write(blob);
+ cert.signatures.x509.signature = signer.sign();
+
+ return (true);
+}
+
+function write(cert, options) {
+ var sig = cert.signatures.x509;
+ assert.object(sig, 'x509 signature');
+
+ var der = new asn1.BerWriter();
+ der.startSequence();
+ if (sig.cache) {
+ der._ensure(sig.cache.length);
+ sig.cache.copy(der._buf, der._offset);
+ der._offset += sig.cache.length;
+ } else {
+ writeTBSCert(cert, der);
+ }
+
+ der.startSequence();
+ der.writeOID(SIGN_ALGS[sig.algo]);
+ if (sig.algo.match(/^rsa-/))
+ der.writeNull();
+ der.endSequence();
+
+ var sigData = sig.signature.toBuffer('asn1');
+ var data = new Buffer(sigData.length + 1);
+ data[0] = 0;
+ sigData.copy(data, 1);
+ der.writeBuffer(data, asn1.Ber.BitString);
+ der.endSequence();
+
+ return (der.buffer);
+}
+
+function writeTBSCert(cert, der) {
+ var sig = cert.signatures.x509;
+ assert.object(sig, 'x509 signature');
+
+ der.startSequence();
+
+ der.startSequence(Local(0));
+ der.writeInt(2);
+ der.endSequence();
+
+ der.writeBuffer(utils.mpNormalize(cert.serial), asn1.Ber.Integer);
+
+ der.startSequence();
+ der.writeOID(SIGN_ALGS[sig.algo]);
+ der.endSequence();
+
+ cert.issuer.toAsn1(der);
+
+ der.startSequence();
+ der.writeString(dateToUTCTime(cert.validFrom), asn1.Ber.UTCTime);
+ der.writeString(dateToUTCTime(cert.validUntil), asn1.Ber.UTCTime);
+ der.endSequence();
+
+ var subject = cert.subjects[0];
+ var altNames = cert.subjects.slice(1);
+ subject.toAsn1(der);
+
+ pkcs8.writePkcs8(der, cert.subjectKey);
+
+ if (sig.extras && sig.extras.issuerUniqueID) {
+ der.writeBuffer(sig.extras.issuerUniqueID, Local(1));
+ }
+
+ if (sig.extras && sig.extras.subjectUniqueID) {
+ der.writeBuffer(sig.extras.subjectUniqueID, Local(2));
+ }
+
+ if (altNames.length > 0 || subject.type === 'host' ||
+ (sig.extras && sig.extras.exts)) {
+ der.startSequence(Local(3));
+ der.startSequence();
+
+ var exts = [
+ { oid: EXTS.altName }
+ ];
+ if (sig.extras && sig.extras.exts)
+ exts = sig.extras.exts;
+
+ for (var i = 0; i < exts.length; ++i) {
+ der.startSequence();
+ der.writeOID(exts[i].oid);
+
+ if (exts[i].critical !== undefined)
+ der.writeBoolean(exts[i].critical);
+
+ if (exts[i].oid === EXTS.altName) {
+ der.startSequence(asn1.Ber.OctetString);
+ der.startSequence();
+ if (subject.type === 'host') {
+ der.writeString(subject.hostname,
+ Context(2));
+ }
+ for (var j = 0; j < altNames.length; ++j) {
+ if (altNames[j].type === 'host') {
+ der.writeString(
+ altNames[j].hostname,
+ ALTNAME.DNSName);
+ } else if (altNames[j].type ===
+ 'email') {
+ der.writeString(
+ altNames[j].email,
+ ALTNAME.RFC822Name);
+ } else {
+ /*
+ * Encode anything else as a
+ * DN style name for now.
+ */
+ der.startSequence(
+ ALTNAME.DirectoryName);
+ altNames[j].toAsn1(der);
+ der.endSequence();
+ }
+ }
+ der.endSequence();
+ der.endSequence();
+ } else {
+ der.writeBuffer(exts[i].data,
+ asn1.Ber.OctetString);
+ }
+
+ der.endSequence();
+ }
+
+ der.endSequence();
+ der.endSequence();
+ }
+
+ der.endSequence();
+}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/identity.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/identity.js
new file mode 100644
index 0000000000..b4f5cd73ec
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/identity.js
@@ -0,0 +1,255 @@
+// Copyright 2016 Joyent, Inc.
+
+module.exports = Identity;
+
+var assert = require('assert-plus');
+var algs = require('./algs');
+var crypto = require('crypto');
+var Fingerprint = require('./fingerprint');
+var Signature = require('./signature');
+var errs = require('./errors');
+var util = require('util');
+var utils = require('./utils');
+var asn1 = require('asn1');
+
+/*JSSTYLED*/
+var DNS_NAME_RE = /^([*]|[a-z0-9][a-z0-9\-]{0,62})(?:\.([*]|[a-z0-9][a-z0-9\-]{0,62}))*$/i;
+
+var oids = {};
+oids.cn = '2.5.4.3';
+oids.o = '2.5.4.10';
+oids.ou = '2.5.4.11';
+oids.l = '2.5.4.7';
+oids.s = '2.5.4.8';
+oids.c = '2.5.4.6';
+oids.sn = '2.5.4.4';
+oids.dc = '0.9.2342.19200300.100.1.25';
+oids.uid = '0.9.2342.19200300.100.1.1';
+oids.mail = '0.9.2342.19200300.100.1.3';
+
+var unoids = {};
+Object.keys(oids).forEach(function (k) {
+ unoids[oids[k]] = k;
+});
+
+function Identity(opts) {
+ var self = this;
+ assert.object(opts, 'options');
+ assert.arrayOfObject(opts.components, 'options.components');
+ this.components = opts.components;
+ this.componentLookup = {};
+ this.components.forEach(function (c) {
+ if (c.name && !c.oid)
+ c.oid = oids[c.name];
+ if (c.oid && !c.name)
+ c.name = unoids[c.oid];
+ if (self.componentLookup[c.name] === undefined)
+ self.componentLookup[c.name] = [];
+ self.componentLookup[c.name].push(c);
+ });
+ if (this.componentLookup.cn && this.componentLookup.cn.length > 0) {
+ this.cn = this.componentLookup.cn[0].value;
+ }
+ assert.optionalString(opts.type, 'options.type');
+ if (opts.type === undefined) {
+ if (this.components.length === 1 &&
+ this.componentLookup.cn &&
+ this.componentLookup.cn.length === 1 &&
+ this.componentLookup.cn[0].value.match(DNS_NAME_RE)) {
+ this.type = 'host';
+ this.hostname = this.componentLookup.cn[0].value;
+
+ } else if (this.componentLookup.dc &&
+ this.components.length === this.componentLookup.dc.length) {
+ this.type = 'host';
+ this.hostname = this.componentLookup.dc.map(
+ function (c) {
+ return (c.value);
+ }).join('.');
+
+ } else if (this.componentLookup.uid &&
+ this.components.length ===
+ this.componentLookup.uid.length) {
+ this.type = 'user';
+ this.uid = this.componentLookup.uid[0].value;
+
+ } else if (this.componentLookup.cn &&
+ this.componentLookup.cn.length === 1 &&
+ this.componentLookup.cn[0].value.match(DNS_NAME_RE)) {
+ this.type = 'host';
+ this.hostname = this.componentLookup.cn[0].value;
+
+ } else if (this.componentLookup.uid &&
+ this.componentLookup.uid.length === 1) {
+ this.type = 'user';
+ this.uid = this.componentLookup.uid[0].value;
+
+ } else if (this.componentLookup.mail &&
+ this.componentLookup.mail.length === 1) {
+ this.type = 'email';
+ this.email = this.componentLookup.mail[0].value;
+
+ } else if (this.componentLookup.cn &&
+ this.componentLookup.cn.length === 1) {
+ this.type = 'user';
+ this.uid = this.componentLookup.cn[0].value;
+
+ } else {
+ this.type = 'unknown';
+ }
+ } else {
+ this.type = opts.type;
+ if (this.type === 'host')
+ this.hostname = opts.hostname;
+ else if (this.type === 'user')
+ this.uid = opts.uid;
+ else if (this.type === 'email')
+ this.email = opts.email;
+ else
+ throw (new Error('Unknown type ' + this.type));
+ }
+}
+
+Identity.prototype.toString = function () {
+ return (this.components.map(function (c) {
+ return (c.name.toUpperCase() + '=' + c.value);
+ }).join(', '));
+};
+
+Identity.prototype.toAsn1 = function (der, tag) {
+ der.startSequence(tag);
+ this.components.forEach(function (c) {
+ der.startSequence(asn1.Ber.Constructor | asn1.Ber.Set);
+ der.startSequence();
+ der.writeOID(c.oid);
+ der.writeString(c.value, asn1.Ber.PrintableString);
+ der.endSequence();
+ der.endSequence();
+ });
+ der.endSequence();
+};
+
+function globMatch(a, b) {
+ if (a === '**' || b === '**')
+ return (true);
+ var aParts = a.split('.');
+ var bParts = b.split('.');
+ if (aParts.length !== bParts.length)
+ return (false);
+ for (var i = 0; i < aParts.length; ++i) {
+ if (aParts[i] === '*' || bParts[i] === '*')
+ continue;
+ if (aParts[i] !== bParts[i])
+ return (false);
+ }
+ return (true);
+}
+
+Identity.prototype.equals = function (other) {
+ if (!Identity.isIdentity(other, [1, 0]))
+ return (false);
+ if (other.components.length !== this.components.length)
+ return (false);
+ for (var i = 0; i < this.components.length; ++i) {
+ if (this.components[i].oid !== other.components[i].oid)
+ return (false);
+ if (!globMatch(this.components[i].value,
+ other.components[i].value)) {
+ return (false);
+ }
+ }
+ return (true);
+};
+
+Identity.forHost = function (hostname) {
+ assert.string(hostname, 'hostname');
+ return (new Identity({
+ type: 'host',
+ hostname: hostname,
+ components: [ { name: 'cn', value: hostname } ]
+ }));
+};
+
+Identity.forUser = function (uid) {
+ assert.string(uid, 'uid');
+ return (new Identity({
+ type: 'user',
+ uid: uid,
+ components: [ { name: 'uid', value: uid } ]
+ }));
+};
+
+Identity.forEmail = function (email) {
+ assert.string(email, 'email');
+ return (new Identity({
+ type: 'email',
+ email: email,
+ components: [ { name: 'mail', value: email } ]
+ }));
+};
+
+Identity.parseDN = function (dn) {
+ assert.string(dn, 'dn');
+ var parts = dn.split(',');
+ var cmps = parts.map(function (c) {
+ c = c.trim();
+ var eqPos = c.indexOf('=');
+ var name = c.slice(0, eqPos).toLowerCase();
+ var value = c.slice(eqPos + 1);
+ return ({ name: name, value: value });
+ });
+ return (new Identity({ components: cmps }));
+};
+
+Identity.parseAsn1 = function (der, top) {
+ var components = [];
+ der.readSequence(top);
+ var end = der.offset + der.length;
+ while (der.offset < end) {
+ der.readSequence(asn1.Ber.Constructor | asn1.Ber.Set);
+ var after = der.offset + der.length;
+ der.readSequence();
+ var oid = der.readOID();
+ var type = der.peek();
+ var value;
+ switch (type) {
+ case asn1.Ber.PrintableString:
+ case asn1.Ber.IA5String:
+ case asn1.Ber.OctetString:
+ case asn1.Ber.T61String:
+ value = der.readString(type);
+ break;
+ case asn1.Ber.Utf8String:
+ value = der.readString(type, true);
+ value = value.toString('utf8');
+ break;
+ case asn1.Ber.CharacterString:
+ case asn1.Ber.BMPString:
+ value = der.readString(type, true);
+ value = value.toString('utf16le');
+ break;
+ default:
+ throw (new Error('Unknown asn1 type ' + type));
+ }
+ components.push({ oid: oid, value: value });
+ der._offset = after;
+ }
+ der._offset = end;
+ return (new Identity({
+ components: components
+ }));
+};
+
+Identity.isIdentity = function (obj, ver) {
+ return (utils.isCompatible(obj, Identity, ver));
+};
+
+/*
+ * API versions for Identity:
+ * [1,0] -- initial ver
+ */
+Identity.prototype._sshpkApiVersion = [1, 0];
+
+Identity._oldVersionDetect = function (obj) {
+ return ([1, 0]);
+};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js
index 5cd962b312..96a1384286 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/index.js
@@ -4,6 +4,8 @@ var Key = require('./key');
var Fingerprint = require('./fingerprint');
var Signature = require('./signature');
var PrivateKey = require('./private-key');
+var Certificate = require('./certificate');
+var Identity = require('./identity');
var errs = require('./errors');
module.exports = {
@@ -16,10 +18,21 @@ module.exports = {
parseSignature: Signature.parse,
PrivateKey: PrivateKey,
parsePrivateKey: PrivateKey.parse,
+ Certificate: Certificate,
+ parseCertificate: Certificate.parse,
+ createSelfSignedCertificate: Certificate.createSelfSigned,
+ createCertificate: Certificate.create,
+ Identity: Identity,
+ identityFromDN: Identity.parseDN,
+ identityForHost: Identity.forHost,
+ identityForUser: Identity.forUser,
+ identityForEmail: Identity.forEmail,
/* errors */
FingerprintFormatError: errs.FingerprintFormatError,
InvalidAlgorithmError: errs.InvalidAlgorithmError,
KeyParseError: errs.KeyParseError,
- SignatureParseError: errs.SignatureParseError
+ SignatureParseError: errs.SignatureParseError,
+ KeyEncryptedError: errs.KeyEncryptedError,
+ CertificateParseError: errs.CertificateParseError
};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js
index d140f0e54d..ff5c363733 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/key.js
@@ -77,11 +77,12 @@ function Key(opts) {
Key.formats = formats;
-Key.prototype.toBuffer = function (format) {
+Key.prototype.toBuffer = function (format, options) {
if (format === undefined)
format = 'ssh';
assert.string(format, 'format');
assert.object(formats[format], 'formats[format]');
+ assert.optionalObject(options, 'options');
if (format === 'rfc4253') {
if (this._rfc4253Cache === undefined)
@@ -89,11 +90,11 @@ Key.prototype.toBuffer = function (format) {
return (this._rfc4253Cache);
}
- return (formats[format].write(this));
+ return (formats[format].write(this, options));
};
-Key.prototype.toString = function (format) {
- return (this.toBuffer(format).toString());
+Key.prototype.toString = function (format, options) {
+ return (this.toBuffer(format, options).toString());
};
Key.prototype.hash = function (algo) {
@@ -107,9 +108,6 @@ Key.prototype.hash = function (algo) {
var hash = crypto.createHash(algo).
update(this.toBuffer('rfc4253')).digest();
- /* Workaround for node 0.8 */
- if (typeof (hash) === 'string')
- hash = new Buffer(hash, 'binary');
this._hashCache[algo] = hash;
return (hash);
};
@@ -119,6 +117,7 @@ Key.prototype.fingerprint = function (algo) {
algo = 'sha256';
assert.string(algo, 'algorithm');
var opts = {
+ type: 'key',
hash: this.hash(algo),
algorithm: algo
};
@@ -158,10 +157,7 @@ Key.prototype.createVerify = function (hashAlgo) {
var v, nm, err;
try {
- nm = this.type.toUpperCase() + '-';
- if (this.type === 'ecdsa')
- nm = 'ecdsa-with-';
- nm += hashAlgo.toUpperCase();
+ nm = hashAlgo.toUpperCase();
v = crypto.createVerify(nm);
} catch (e) {
err = e;
@@ -213,26 +209,34 @@ Key.prototype.createDiffieHellman = function () {
};
Key.prototype.createDH = Key.prototype.createDiffieHellman;
-Key.parse = function (data, format, name) {
+Key.parse = function (data, format, options) {
if (typeof (data) !== 'string')
assert.buffer(data, 'data');
if (format === undefined)
format = 'auto';
assert.string(format, 'format');
- if (name === undefined)
- name = '(unnamed)';
+ if (typeof (options) === 'string')
+ options = { filename: options };
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalString(options.filename, 'options.filename');
+ if (options.filename === undefined)
+ options.filename = '(unnamed)';
assert.object(formats[format], 'formats[format]');
try {
- var k = formats[format].read(data);
+ var k = formats[format].read(data, options);
if (k instanceof PrivateKey)
k = k.toPublic();
if (!k.comment)
- k.comment = name;
+ k.comment = options.filename;
return (k);
} catch (e) {
- throw (new KeyParseError(name, format, e));
+ if (e.name === 'KeyEncryptedError')
+ throw (e);
+ throw (new KeyParseError(options.filename, format, e));
}
};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/private-key.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/private-key.js
index 993ae32650..f80d939662 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/private-key.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/private-key.js
@@ -23,6 +23,7 @@ var Key = require('./key');
var InvalidAlgorithmError = errs.InvalidAlgorithmError;
var KeyParseError = errs.KeyParseError;
+var KeyEncryptedError = errs.KeyEncryptedError;
var formats = {};
formats['auto'] = require('./formats/auto');
@@ -44,13 +45,14 @@ util.inherits(PrivateKey, Key);
PrivateKey.formats = formats;
-PrivateKey.prototype.toBuffer = function (format) {
+PrivateKey.prototype.toBuffer = function (format, options) {
if (format === undefined)
format = 'pkcs1';
assert.string(format, 'format');
assert.object(formats[format], 'formats[format]');
+ assert.optionalObject(options, 'options');
- return (formats[format].write(this));
+ return (formats[format].write(this, options));
};
PrivateKey.prototype.hash = function (algo) {
@@ -146,10 +148,7 @@ PrivateKey.prototype.createSign = function (hashAlgo) {
var v, nm, err;
try {
- nm = this.type.toUpperCase() + '-';
- if (this.type === 'ecdsa')
- nm = 'ecdsa-with-';
- nm += hashAlgo.toUpperCase();
+ nm = hashAlgo.toUpperCase();
v = crypto.createSign(nm);
} catch (e) {
err = e;
@@ -175,25 +174,33 @@ PrivateKey.prototype.createSign = function (hashAlgo) {
return (v);
};
-PrivateKey.parse = function (data, format, name) {
+PrivateKey.parse = function (data, format, options) {
if (typeof (data) !== 'string')
assert.buffer(data, 'data');
if (format === undefined)
format = 'auto';
assert.string(format, 'format');
- if (name === undefined)
- name = '(unnamed)';
+ if (typeof (options) === 'string')
+ options = { filename: options };
+ assert.optionalObject(options, 'options');
+ if (options === undefined)
+ options = {};
+ assert.optionalString(options.filename, 'options.filename');
+ if (options.filename === undefined)
+ options.filename = '(unnamed)';
assert.object(formats[format], 'formats[format]');
try {
- var k = formats[format].read(data);
+ var k = formats[format].read(data, options);
assert.ok(k instanceof PrivateKey, 'key is not a private key');
if (!k.comment)
- k.comment = name;
+ k.comment = options.filename;
return (k);
} catch (e) {
- throw (new KeyParseError(name, format, e));
+ if (e.name === 'KeyEncryptedError')
+ throw (e);
+ throw (new KeyParseError(options.filename, format, e));
}
};
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js
index ddf4a8c988..964f55cb56 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/signature.js
@@ -65,23 +65,31 @@ Signature.prototype.toBuffer = function (format) {
buf = new SSHBuffer({});
buf.writeString('ssh-dss');
r = this.part.r.data;
- if (r[0] === 0x00)
+ if (r.length > 20 && r[0] === 0x00)
r = r.slice(1);
s = this.part.s.data;
+ if (s.length > 20 && s[0] === 0x00)
+ s = s.slice(1);
+ if ((this.hashAlgorithm &&
+ this.hashAlgorithm !== 'sha1') ||
+ r.length + s.length !== 40) {
+ throw (new Error('OpenSSH only supports ' +
+ 'DSA signatures with SHA1 hash'));
+ }
buf.writeBuffer(Buffer.concat([r, s]));
return (buf.toBuffer());
} else if (format === 'ssh' && this.type === 'ecdsa') {
var inner = new SSHBuffer({});
- r = this.part.r;
- if (r[0] === 0x00)
- r = r.slice(1);
- inner.writePart(r);
+ r = this.part.r.data;
+ inner.writeBuffer(r);
inner.writePart(this.part.s);
buf = new SSHBuffer({});
/* XXX: find a more proper way to do this? */
var curve;
- var sz = this.part.r.data.length * 8;
+ if (r[0] === 0x00)
+ r = r.slice(1);
+ var sz = r.length * 8;
if (sz === 256)
curve = 'nistp256';
else if (sz === 384)
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js
index 0b00277349..8fc2cb8785 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/ssh-buffer.js
@@ -73,6 +73,14 @@ SSHBuffer.prototype.readInt = function () {
return (v);
};
+SSHBuffer.prototype.readInt64 = function () {
+ assert.ok(this._offset + 8 < this._buffer.length,
+ 'buffer not long enough to read Int64');
+ var v = this._buffer.slice(this._offset, this._offset + 8);
+ this._offset += 8;
+ return (v);
+};
+
SSHBuffer.prototype.readChar = function () {
var v = this._buffer[this._offset++];
return (v);
@@ -106,6 +114,22 @@ SSHBuffer.prototype.writeInt = function (v) {
this._offset += 4;
};
+SSHBuffer.prototype.writeInt64 = function (v) {
+ assert.buffer(v, 'value');
+ if (v.length > 8) {
+ var lead = v.slice(0, v.length - 8);
+ for (var i = 0; i < lead.length; ++i) {
+ assert.strictEqual(lead[i], 0,
+ 'must fit in 64 bits of precision');
+ }
+ v = v.slice(v.length - 8, v.length);
+ }
+ while (this._offset + 8 > this._size)
+ this.expand();
+ v.copy(this._buffer, this._offset);
+ this._offset += 8;
+};
+
SSHBuffer.prototype.writeChar = function (v) {
while (this._offset + 1 > this._size)
this.expand();
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js
index 34c22d31a6..d57245cc16 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/lib/utils.js
@@ -8,11 +8,13 @@ module.exports = {
ecNormalize: ecNormalize,
countZeros: countZeros,
assertCompatible: assertCompatible,
- isCompatible: isCompatible
+ isCompatible: isCompatible,
+ opensslKeyDeriv: opensslKeyDeriv
};
var assert = require('assert-plus');
var PrivateKey = require('./private-key');
+var crypto = require('crypto');
var MAX_CLASS_DEPTH = 3;
@@ -68,6 +70,43 @@ function assertCompatible(obj, klass, needVer, name) {
'version ' + needVer[0] + '.' + needVer[1]);
}
+var CIPHER_LEN = {
+ 'des-ede3-cbc': { key: 7, iv: 8 },
+ 'aes-128-cbc': { key: 16, iv: 16 }
+};
+var PKCS5_SALT_LEN = 8;
+
+function opensslKeyDeriv(cipher, salt, passphrase, count) {
+ assert.buffer(salt, 'salt');
+ assert.buffer(passphrase, 'passphrase');
+ assert.number(count, 'iteration count');
+
+ var clen = CIPHER_LEN[cipher];
+ assert.object(clen, 'supported cipher');
+
+ salt = salt.slice(0, PKCS5_SALT_LEN);
+
+ var D, D_prev, bufs;
+ var material = new Buffer(0);
+ while (material.length < clen.key + clen.iv) {
+ bufs = [];
+ if (D_prev)
+ bufs.push(D_prev);
+ bufs.push(passphrase);
+ bufs.push(salt);
+ D = Buffer.concat(bufs);
+ for (var j = 0; j < count; ++j)
+ D = crypto.createHash('md5').update(D).digest();
+ material = Buffer.concat([material, D]);
+ D_prev = D;
+ }
+
+ return ({
+ key: material.slice(0, clen.key),
+ iv: material.slice(clen.key, clen.key + clen.iv)
+ });
+}
+
/* Count leading zero bits on a buffer */
function countZeros(buf) {
var o = 0, obit = 8;
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-conv.1 b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-conv.1
index d03b306739..0887dce272 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-conv.1
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/man/man1/sshpk-conv.1
@@ -13,7 +13,7 @@ Reads in a public or private key and converts it between different formats,
particularly formats used in the SSH protocol and the well\-known PEM PKCS#1/7
formats.
.PP
-In the second form, with the \fB\fC\-i\fR option given, identifies a key and prints to
+In the second form, with the \fB\fC\-i\fR option given, identifies a key and prints to
stderr information about its nature, size and fingerprint.
.SH EXAMPLES
.PP
@@ -76,7 +76,7 @@ MIIDpAIBAAKCAQEA6T/GYJndb1TRH3+NL....
.SH OPTIONS
.TP
\fB\fC\-i, \-\-identify\fR
-Instead of converting the key, output identifying information about it to
+Instead of converting the key, output identifying information about it to
stderr, including its type, size and fingerprints.
.TP
\fB\fC\-p, \-\-private\fR
@@ -125,7 +125,7 @@ The internal binary format of keys when sent over the wire in the SSH
protocol. This is also the format that the \fB\fCssh\-agent\fR uses in its protocol.
.SH SEE ALSO
.PP
-.BR ssh-keygen (1),
+.BR ssh-keygen (1),
.BR openssl (1)
.SH BUGS
.PP
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/asn1/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/asn1/package.json
index 9d3b1f7ecf..7e1f2b3ace 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/asn1/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/asn1/package.json
@@ -1,8 +1,16 @@
{
"_args": [
[
- "asn1@>=0.2.3 <0.3.0",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
+ {
+ "raw": "asn1@~0.2.3",
+ "scope": null,
+ "escapedName": "asn1",
+ "name": "asn1",
+ "rawSpec": "~0.2.3",
+ "spec": ">=0.2.3 <0.3.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
"_from": "asn1@>=0.2.3 <0.3.0",
@@ -11,16 +19,17 @@
"_installable": true,
"_location": "/request/http-signature/sshpk/asn1",
"_npmUser": {
- "email": "patrick.f.mooney@gmail.com",
- "name": "pfmooney"
+ "name": "pfmooney",
+ "email": "patrick.f.mooney@gmail.com"
},
"_npmVersion": "1.4.28",
"_phantomChildren": {},
"_requested": {
- "name": "asn1",
- "raw": "asn1@>=0.2.3 <0.3.0",
- "rawSpec": ">=0.2.3 <0.3.0",
+ "raw": "asn1@~0.2.3",
"scope": null,
+ "escapedName": "asn1",
+ "name": "asn1",
+ "rawSpec": "~0.2.3",
"spec": ">=0.2.3 <0.3.0",
"type": "range"
},
@@ -30,11 +39,11 @@
"_resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
"_shasum": "dac8787713c9966849fc8180777ebe9c1ddf3b86",
"_shrinkwrap": null,
- "_spec": "asn1@>=0.2.3 <0.3.0",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
+ "_spec": "asn1@~0.2.3",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
- "email": "mcavage@gmail.com",
- "name": "Mark Cavage"
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
},
"bugs": {
"url": "https://github.com/mcavage/node-asn1/issues"
@@ -61,7 +70,7 @@
"directories": {},
"dist": {
"shasum": "dac8787713c9966849fc8180777ebe9c1ddf3b86",
- "tarball": "http://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz"
+ "tarball": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz"
},
"homepage": "https://github.com/mcavage/node-asn1",
"license": "MIT",
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/AUTHORS b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/AUTHORS
index 1923524fe4..1923524fe4 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/AUTHORS
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/AUTHORS
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/CHANGES.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/CHANGES.md
index 57d92bfdb9..57d92bfdb9 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/CHANGES.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/CHANGES.md
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/README.md
index ec200d161e..ec200d161e 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/README.md
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/assert.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/assert.js
index 26f944eec3..26f944eec3 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/assert.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/assert.js
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json
index 5e7cfaadf2..305af0ddb3 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/node_modules/assert-plus/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json
@@ -1,69 +1,80 @@
{
"_args": [
[
- "assert-plus@^1.0.0",
- "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash"
+ {
+ "raw": "assert-plus@^1.0.0",
+ "scope": null,
+ "escapedName": "assert-plus",
+ "name": "assert-plus",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
"_from": "assert-plus@>=1.0.0 <2.0.0",
"_id": "assert-plus@1.0.0",
"_inCache": true,
"_installable": true,
- "_location": "/request/http-signature/sshpk/dashdash/assert-plus",
+ "_location": "/request/http-signature/sshpk/assert-plus",
"_nodeVersion": "0.10.40",
"_npmUser": {
- "email": "patrick.f.mooney@gmail.com",
- "name": "pfmooney"
+ "name": "pfmooney",
+ "email": "patrick.f.mooney@gmail.com"
},
"_npmVersion": "3.3.9",
"_phantomChildren": {},
"_requested": {
- "name": "assert-plus",
"raw": "assert-plus@^1.0.0",
- "rawSpec": "^1.0.0",
"scope": null,
+ "escapedName": "assert-plus",
+ "name": "assert-plus",
+ "rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
- "/request/http-signature/sshpk/dashdash"
+ "/request/http-signature/sshpk",
+ "/request/http-signature/sshpk/dashdash",
+ "/request/http-signature/sshpk/getpass"
],
"_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
"_shrinkwrap": null,
"_spec": "assert-plus@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
- "email": "mcavage@gmail.com",
- "name": "Mark Cavage"
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
},
"bugs": {
"url": "https://github.com/mcavage/node-assert-plus/issues"
},
"contributors": [
{
- "email": "dave@daveeddy.com",
- "name": "Dave Eddy"
+ "name": "Dave Eddy",
+ "email": "dave@daveeddy.com"
},
{
- "email": "fred.kuo@joyent.com",
- "name": "Fred Kuo"
+ "name": "Fred Kuo",
+ "email": "fred.kuo@joyent.com"
},
{
- "email": "ralphtheninja@riseup.net",
- "name": "Lars-Magnus Skog"
+ "name": "Lars-Magnus Skog",
+ "email": "ralphtheninja@riseup.net"
},
{
- "email": "mcavage@gmail.com",
- "name": "Mark Cavage"
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
},
{
- "email": "pmooney@pfmooney.com",
- "name": "Patrick Mooney"
+ "name": "Patrick Mooney",
+ "email": "pmooney@pfmooney.com"
},
{
- "email": "robert.gulewich@joyent.com",
- "name": "Rob Gulewich"
+ "name": "Rob Gulewich",
+ "email": "robert.gulewich@joyent.com"
}
],
"dependencies": {},
@@ -75,7 +86,7 @@
"directories": {},
"dist": {
"shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
- "tarball": "http://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz"
+ "tarball": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz"
},
"engines": {
"node": ">=0.8"
@@ -85,12 +96,12 @@
"main": "./assert.js",
"maintainers": [
{
- "email": "mcavage@gmail.com",
- "name": "mcavage"
+ "name": "mcavage",
+ "email": "mcavage@gmail.com"
},
{
- "email": "patrick.f.mooney@gmail.com",
- "name": "pfmooney"
+ "name": "pfmooney",
+ "email": "patrick.f.mooney@gmail.com"
}
],
"name": "assert-plus",
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js
index 572b00edee..adb6f13b15 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/lib/dashdash.js
@@ -826,7 +826,7 @@ function bashCompletionSpecFromOptions(args) {
var longopts = [];
var optargs = [];
(args.options || []).forEach(function (o) {
- if (o.group) {
+ if (o.group !== undefined && o.group !== null) {
// Skip group headers.
return;
}
@@ -999,12 +999,45 @@ function getOptionType(name) {
}
+/**
+ * Return a synopsis string for the given option spec.
+ *
+ * Examples:
+ * > synopsisFromOpt({names: ['help', 'h'], type: 'bool'});
+ * '[ --help | -h ]'
+ * > synopsisFromOpt({name: 'file', type: 'string', helpArg: 'FILE'});
+ * '[ --file=FILE ]'
+ */
+function synopsisFromOpt(o) {
+ assert.object(o, 'o');
+
+ if (o.hasOwnProperty('group')) {
+ return null;
+ }
+ var names = o.names || [o.name];
+ // `type` here could be undefined if, for example, the command has a
+ // dashdash option spec with a bogus 'type'.
+ var type = getOptionType(o.type);
+ var helpArg = o.helpArg || (type && type.helpArg) || 'ARG';
+ var parts = [];
+ names.forEach(function (name) {
+ var part = (name.length === 1 ? '-' : '--') + name;
+ if (type && type.takesArg) {
+ part += (name.length === 1 ? ' ' + helpArg : '=' + helpArg);
+ }
+ parts.push(part);
+ });
+ return ('[ ' + parts.join(' | ') + ' ]');
+};
+
+
module.exports = {
createParser: createParser,
Parser: Parser,
parse: parse,
addOptionType: addOptionType,
getOptionType: getOptionType,
+ synopsisFromOpt: synopsisFromOpt,
// Bash completion-related exports
BASH_COMPLETION_TEMPLATE_PATH: BASH_COMPLETION_TEMPLATE_PATH,
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
index 81f871030f..03c284deca 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/dashdash/package.json
@@ -1,44 +1,53 @@
{
"_args": [
[
- "dashdash@>=1.10.1 <2.0.0",
+ {
+ "raw": "dashdash@^1.12.0",
+ "scope": null,
+ "escapedName": "dashdash",
+ "name": "dashdash",
+ "rawSpec": "^1.12.0",
+ "spec": ">=1.12.0 <2.0.0",
+ "type": "range"
+ },
"/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
- "_from": "dashdash@>=1.10.1 <2.0.0",
- "_id": "dashdash@1.13.0",
+ "_from": "dashdash@>=1.12.0 <2.0.0",
+ "_id": "dashdash@1.14.0",
"_inCache": true,
"_installable": true,
"_location": "/request/http-signature/sshpk/dashdash",
"_npmOperationalInternal": {
- "host": "packages-5-east.internal.npmjs.com",
- "tmp": "tmp/dashdash-1.13.0.tgz_1455248887432_0.5643249636050314"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/dashdash-1.14.0.tgz_1464847169030_0.07120498712174594"
},
"_npmUser": {
- "email": "trentm@gmail.com",
- "name": "trentm"
+ "name": "trentm",
+ "email": "trentm@gmail.com"
},
"_npmVersion": "1.4.29",
"_phantomChildren": {},
"_requested": {
- "name": "dashdash",
- "raw": "dashdash@>=1.10.1 <2.0.0",
- "rawSpec": ">=1.10.1 <2.0.0",
+ "raw": "dashdash@^1.12.0",
"scope": null,
- "spec": ">=1.10.1 <2.0.0",
+ "escapedName": "dashdash",
+ "name": "dashdash",
+ "rawSpec": "^1.12.0",
+ "spec": ">=1.12.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/request/http-signature/sshpk"
],
- "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.13.0.tgz",
- "_shasum": "a5aae6fd9d8e156624eb0dd9259eb12ba245385a",
+ "_resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz",
+ "_shasum": "29e486c5418bf0f356034a993d51686a33e84141",
"_shrinkwrap": null,
- "_spec": "dashdash@>=1.10.1 <2.0.0",
+ "_spec": "dashdash@^1.12.0",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
- "email": "trentm@gmail.com",
"name": "Trent Mick",
+ "email": "trentm@gmail.com",
"url": "http://trentm.com"
},
"bugs": {
@@ -46,8 +55,8 @@
},
"contributors": [
{
- "email": "trentm@gmail.com",
"name": "Trent Mick",
+ "email": "trentm@gmail.com",
"url": "http://trentm.com"
},
{
@@ -76,13 +85,13 @@
},
"directories": {},
"dist": {
- "shasum": "a5aae6fd9d8e156624eb0dd9259eb12ba245385a",
- "tarball": "http://registry.npmjs.org/dashdash/-/dashdash-1.13.0.tgz"
+ "shasum": "29e486c5418bf0f356034a993d51686a33e84141",
+ "tarball": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.0.tgz"
},
"engines": {
"node": ">=0.10"
},
- "gitHead": "69425c9d9000d72c95e78ca43e3f84675f8f73ff",
+ "gitHead": "2f70d248a509418e4473922ee034faf9cd91b3f8",
"homepage": "https://github.com/trentm/node-dashdash",
"keywords": [
"option",
@@ -98,8 +107,8 @@
"main": "./lib/dashdash.js",
"maintainers": [
{
- "email": "trentm@gmail.com",
- "name": "trentm"
+ "name": "trentm",
+ "email": "trentm@gmail.com"
}
],
"name": "dashdash",
@@ -112,5 +121,5 @@
"scripts": {
"test": "nodeunit test/*.test.js"
},
- "version": "1.13.0"
+ "version": "1.14.0"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/index.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/index.js
index 371b545c53..24372810b8 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/index.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/index.js
@@ -25,11 +25,11 @@ exports.ECKey = function(curve, key, isPublic)
// var y = key.slice(bytes+1);
// this.P = new ECPointFp(curve,
// curve.fromBigInteger(new BigInteger(x.toString("hex"), 16)),
-// curve.fromBigInteger(new BigInteger(y.toString("hex"), 16)));
+// curve.fromBigInteger(new BigInteger(y.toString("hex"), 16)));
this.P = curve.decodePointHex(key.toString("hex"));
}else{
if(key.length != bytes) return false;
- priv = new BigInteger(key.toString("hex"), 16);
+ priv = new BigInteger(key.toString("hex"), 16);
}
}else{
var n1 = n.subtract(BigInteger.ONE);
@@ -51,6 +51,7 @@ exports.ECKey = function(curve, key, isPublic)
if(!key || !key.P) return false;
var S = key.P.multiply(priv);
return new Buffer(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex");
- }
+ }
}
}
+
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/LICENSE-jsbn b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/LICENSE-jsbn
index c769b38bea..24502a9cf7 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/LICENSE-jsbn
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/LICENSE-jsbn
@@ -18,9 +18,9 @@ This software is covered under the following copyright:
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/ec.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/ec.js
index 38dc523caa..3852671eca 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/ec.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/lib/ec.js
@@ -434,7 +434,7 @@ ECFieldElementFp.prototype.modReduce = function(x)
{
u = u.multiply(this.getR());
}
- x = u.add(v);
+ x = u.add(v);
}
while (x.compareTo(q) >= 0)
{
@@ -454,8 +454,8 @@ ECFieldElementFp.prototype.sqrt = function()
// p mod 4 == 3
if (this.q.testBit(1))
{
- var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q));
- return z.square().equals(this) ? z : null;
+ var z = new ECFieldElementFp(this.q,this.x.modPow(this.q.shiftRight(2).add(BigInteger.ONE),this.q));
+ return z.square().equals(this) ? z : null;
}
// p mod 4 == 1
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json
index ec581d9a98..2054197955 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/ecc-jsbn/package.json
@@ -1,28 +1,37 @@
{
"_args": [
[
- "ecc-jsbn@>=0.0.1 <1.0.0",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
+ {
+ "raw": "ecc-jsbn@~0.1.1",
+ "scope": null,
+ "escapedName": "ecc-jsbn",
+ "name": "ecc-jsbn",
+ "rawSpec": "~0.1.1",
+ "spec": ">=0.1.1 <0.2.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
- "_from": "ecc-jsbn@>=0.0.1 <1.0.0",
+ "_from": "ecc-jsbn@>=0.1.1 <0.2.0",
"_id": "ecc-jsbn@0.1.1",
"_inCache": true,
"_installable": true,
"_location": "/request/http-signature/sshpk/ecc-jsbn",
"_nodeVersion": "0.12.6",
"_npmUser": {
- "email": "jeremie@jabber.org",
- "name": "quartzjer"
+ "name": "quartzjer",
+ "email": "jeremie@jabber.org"
},
"_npmVersion": "2.11.2",
"_phantomChildren": {},
"_requested": {
- "name": "ecc-jsbn",
- "raw": "ecc-jsbn@>=0.0.1 <1.0.0",
- "rawSpec": ">=0.0.1 <1.0.0",
+ "raw": "ecc-jsbn@~0.1.1",
"scope": null,
- "spec": ">=0.0.1 <1.0.0",
+ "escapedName": "ecc-jsbn",
+ "name": "ecc-jsbn",
+ "rawSpec": "~0.1.1",
+ "spec": ">=0.1.1 <0.2.0",
"type": "range"
},
"_requiredBy": [
@@ -31,11 +40,11 @@
"_resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
"_shasum": "0fc73a9ed5f0d53c38193398523ef7e543777505",
"_shrinkwrap": null,
- "_spec": "ecc-jsbn@>=0.0.1 <1.0.0",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
+ "_spec": "ecc-jsbn@~0.1.1",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
- "email": "jeremie@jabber.org",
"name": "Jeremie Miller",
+ "email": "jeremie@jabber.org",
"url": "http://jeremie.com/"
},
"bugs": {
@@ -49,14 +58,14 @@
"directories": {},
"dist": {
"shasum": "0fc73a9ed5f0d53c38193398523ef7e543777505",
- "tarball": "http://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"
+ "tarball": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"
},
"gitHead": "d35a360352496721030da645e8054f07efc22487",
"homepage": "https://github.com/quartzjer/ecc-jsbn",
"keywords": [
- "browserify",
+ "jsbn",
"ecc",
- "jsbn"
+ "browserify"
],
"license": "MIT",
"main": "index.js",
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.npmignore b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.npmignore
new file mode 100644
index 0000000000..a4261fc06f
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.npmignore
@@ -0,0 +1,8 @@
+.gitmodules
+deps
+docs
+Makefile
+node_modules
+test
+tools
+coverage
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.travis.yml b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.travis.yml
new file mode 100644
index 0000000000..d8b5833a71
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/.travis.yml
@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+ - "5.10"
+ - "4.4"
+ - "4.1"
+ - "0.12"
+ - "0.10"
+before_install:
+ - "make check"
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/LICENSE b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/LICENSE
new file mode 100644
index 0000000000..f6d947d2f6
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/LICENSE
@@ -0,0 +1,18 @@
+Copyright Joyent, Inc. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/README.md
new file mode 100644
index 0000000000..6e4a50f63f
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/README.md
@@ -0,0 +1,32 @@
+## getpass
+
+Get a password from the terminal. Sounds simple? Sounds like the `readline`
+module should be able to do it? NOPE.
+
+## Install and use it
+
+```bash
+npm install --save getpass
+```
+
+```javascript
+const mod_getpass = require('getpass');
+```
+
+## API
+
+### `mod_getpass.getPass([options, ]callback)`
+
+Gets a password from the terminal. If available, this uses `/dev/tty` to avoid
+interfering with any data being piped in or out of stdio.
+
+This function prints a prompt (by default `Password:`) and then accepts input
+without echoing.
+
+Parameters:
+
+ * `options`, an Object, with properties:
+ * `prompt`, an optional String
+ * `callback`, a `Func(error, password)`, with arguments:
+ * `error`, either `null` (no error) or an `Error` instance
+ * `password`, a String
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/lib/index.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/lib/index.js
new file mode 100644
index 0000000000..55a7718c0f
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/lib/index.js
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2016, Joyent, Inc. All rights reserved.
+ * Author: Alex Wilson <alex.wilson@joyent.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+*/
+
+module.exports = {
+ getPass: getPass
+};
+
+const mod_tty = require('tty');
+const mod_fs = require('fs');
+const mod_assert = require('assert-plus');
+
+var BACKSPACE = String.fromCharCode(127);
+var CTRLC = '\u0003';
+var CTRLD = '\u0004';
+
+function getPass(opts, cb) {
+ if (typeof (opts) === 'function' && cb === undefined) {
+ cb = opts;
+ opts = {};
+ }
+ mod_assert.object(opts, 'options');
+ mod_assert.func(cb, 'callback');
+
+ mod_assert.optionalString(opts.prompt, 'options.prompt');
+ if (opts.prompt === undefined)
+ opts.prompt = 'Password';
+
+ openTTY(function (err, rfd, wfd, rtty, wtty) {
+ if (err) {
+ cb(err);
+ return;
+ }
+
+ wtty.write(opts.prompt + ':');
+ rtty.resume();
+ rtty.setRawMode(true);
+ rtty.resume();
+ rtty.setEncoding('utf8');
+
+ var pw = '';
+ rtty.on('data', onData);
+
+ function onData(data) {
+ var str = data.toString('utf8');
+ for (var i = 0; i < str.length; ++i) {
+ var ch = str[i];
+ switch (ch) {
+ case '\r':
+ case '\n':
+ case CTRLD:
+ cleanup();
+ cb(null, pw);
+ return;
+ case CTRLC:
+ cleanup();
+ cb(new Error('Aborted'));
+ return;
+ case BACKSPACE:
+ pw = pw.slice(0, pw.length - 1);
+ break;
+ default:
+ pw += ch;
+ break;
+ }
+ }
+ }
+
+ function cleanup() {
+ wtty.write('\r\n');
+ rtty.setRawMode(false);
+ rtty.pause();
+ rtty.removeListener('data', onData);
+ if (wfd !== undefined && wfd !== rfd) {
+ wtty.end();
+ mod_fs.closeSync(wfd);
+ }
+ if (rfd !== undefined) {
+ rtty.end();
+ mod_fs.closeSync(rfd);
+ }
+ }
+ });
+}
+
+function openTTY(cb) {
+ mod_fs.open('/dev/tty', 'r+', function (err, rttyfd) {
+ if ((err && (err.code === 'ENOENT' || err.code === 'EACCES')) ||
+ (process.version.match(/^v0[.][0-8][.]/))) {
+ cb(null, undefined, undefined, process.stdin,
+ process.stdout);
+ return;
+ }
+ var rtty = new mod_tty.ReadStream(rttyfd);
+ mod_fs.open('/dev/tty', 'w+', function (err3, wttyfd) {
+ var wtty = new mod_tty.WriteStream(wttyfd);
+ if (err3) {
+ cb(err3);
+ return;
+ }
+ cb(null, rttyfd, wttyfd, rtty, wtty);
+ });
+ });
+}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/package.json
new file mode 100644
index 0000000000..bb44e44afc
--- /dev/null
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/getpass/package.json
@@ -0,0 +1,91 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "getpass@^0.1.1",
+ "scope": null,
+ "escapedName": "getpass",
+ "name": "getpass",
+ "rawSpec": "^0.1.1",
+ "spec": ">=0.1.1 <0.2.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
+ ]
+ ],
+ "_from": "getpass@>=0.1.1 <0.2.0",
+ "_id": "getpass@0.1.6",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/request/http-signature/sshpk/getpass",
+ "_nodeVersion": "0.12.9",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/getpass-0.1.6.tgz_1461907090215_0.6450737570412457"
+ },
+ "_npmUser": {
+ "name": "arekinath",
+ "email": "alex@cooperi.net"
+ },
+ "_npmVersion": "2.14.9",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "getpass@^0.1.1",
+ "scope": null,
+ "escapedName": "getpass",
+ "name": "getpass",
+ "rawSpec": "^0.1.1",
+ "spec": ">=0.1.1 <0.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/request/http-signature/sshpk"
+ ],
+ "_resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz",
+ "_shasum": "283ffd9fc1256840875311c1b60e8c40187110e6",
+ "_shrinkwrap": null,
+ "_spec": "getpass@^0.1.1",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
+ "author": {
+ "name": "Alex Wilson",
+ "email": "alex.wilson@joyent.com"
+ },
+ "bugs": {
+ "url": "https://github.com/arekinath/node-getpass/issues"
+ },
+ "dependencies": {
+ "assert-plus": "^1.0.0"
+ },
+ "description": "getpass for node.js",
+ "devDependencies": {
+ "json": "^9.0.3",
+ "pty.js": "^0.3.0",
+ "tape": "^4.4.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "283ffd9fc1256840875311c1b60e8c40187110e6",
+ "tarball": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz"
+ },
+ "gitHead": "e7fdf43ad60aa520f894d41856852aa320f36646",
+ "homepage": "https://github.com/arekinath/node-getpass#readme",
+ "license": "MIT",
+ "main": "lib/index.js",
+ "maintainers": [
+ {
+ "name": "arekinath",
+ "email": "alex@cooperi.net"
+ }
+ ],
+ "name": "getpass",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/arekinath/node-getpass.git"
+ },
+ "scripts": {
+ "test": "tape test/*.test.js"
+ },
+ "version": "0.1.6"
+}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/index.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/index.js
index 11c83e86c7..870983984b 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/index.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/index.js
@@ -3,9 +3,9 @@
/*
* Copyright (c) 2014 Mega Limited
* under the MIT License.
- *
+ *
* Authors: Guy K. Kloss
- *
+ *
* You should have received a copy of the license along with this program.
*/
@@ -13,7 +13,7 @@ var dh = require('./lib/dh');
var eddsa = require('./lib/eddsa');
var curve255 = require('./lib/curve255');
var utils = require('./lib/utils');
-
+
/**
* @exports jodid25519
* Curve 25519-based cryptography collection.
@@ -23,7 +23,7 @@ var utils = require('./lib/utils');
* (EdDSA) based on Ed25519.
*/
var ns = {};
-
+
/** Module version indicator as string (format: [major.minor.patch]). */
ns.VERSION = '0.7.1';
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json
index 3bc9f501c6..12f5e81553 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jodid25519/package.json
@@ -1,8 +1,16 @@
{
"_args": [
[
- "jodid25519@>=1.0.0 <2.0.0",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
+ {
+ "raw": "jodid25519@^1.0.0",
+ "scope": null,
+ "escapedName": "jodid25519",
+ "name": "jodid25519",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
"_from": "jodid25519@>=1.0.0 <2.0.0",
@@ -12,16 +20,17 @@
"_location": "/request/http-signature/sshpk/jodid25519",
"_nodeVersion": "4.1.1",
"_npmUser": {
- "email": "alex@cooperi.net",
- "name": "arekinath"
+ "name": "arekinath",
+ "email": "alex@cooperi.net"
},
"_npmVersion": "2.14.4",
"_phantomChildren": {},
"_requested": {
- "name": "jodid25519",
- "raw": "jodid25519@>=1.0.0 <2.0.0",
- "rawSpec": ">=1.0.0 <2.0.0",
+ "raw": "jodid25519@^1.0.0",
"scope": null,
+ "escapedName": "jodid25519",
+ "name": "jodid25519",
+ "rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
@@ -31,8 +40,8 @@
"_resolved": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz",
"_shasum": "06d4912255093419477d425633606e0e90782967",
"_shrinkwrap": null,
- "_spec": "jodid25519@>=1.0.0 <2.0.0",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
+ "_spec": "jodid25519@^1.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
"name": "Michele Bini, Ron Garret, Guy K. Kloss"
},
@@ -55,22 +64,22 @@
"sinon-chai": "^2.8.0"
},
"directories": {
- "doc": "doc",
"src": "src",
- "test": "test"
+ "test": "test",
+ "doc": "doc"
},
"dist": {
"shasum": "06d4912255093419477d425633606e0e90782967",
- "tarball": "http://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz"
+ "tarball": "https://registry.npmjs.org/jodid25519/-/jodid25519-1.0.2.tgz"
},
"gitHead": "a83b9fcf7fd3be4f27cd4a57817aff171c7cd918",
"homepage": "https://github.com/meganz/jodid25519",
"keywords": [
"Curve25519",
- "ECDH",
- "ECDSA",
"Ed25519",
+ "ECDH",
"EdDSA",
+ "ECDSA",
"encryption",
"signing"
],
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/LICENSE b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/LICENSE
index 7ccbf5073c..2a6457e9ef 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/LICENSE
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/LICENSE
@@ -18,9 +18,9 @@ This software is covered under the following copyright:
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/README.md
index 9686611db7..7aac67f53f 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/README.md
@@ -7,7 +7,7 @@ I felt compelled to put this on github and publish to npm. I haven't tested ever
## usage
var BigInteger = require('jsbn');
-
+
var a = new BigInteger('91823918239182398123');
alert(a.bitLength()); // 67
@@ -171,3 +171,5 @@ returns new BI of absolute value
### bi.isProbablePrime
+
+
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.html b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.html
index ea180b8cc4..7c26a5665c 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.html
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/example.html
@@ -5,8 +5,8 @@
<title></title>
</head>
<body>
-
-
+
+
<script src="index.js"></script>
</body>
</html> \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json
index 838d035ffc..30d10169dc 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/jsbn/package.json
@@ -1,8 +1,16 @@
{
"_args": [
[
- "jsbn@>=0.1.0 <0.2.0",
- "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
+ {
+ "raw": "jsbn@~0.1.0",
+ "scope": null,
+ "escapedName": "jsbn",
+ "name": "jsbn",
+ "rawSpec": "~0.1.0",
+ "spec": ">=0.1.0 <0.2.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
"_from": "jsbn@>=0.1.0 <0.2.0",
@@ -12,16 +20,17 @@
"_location": "/request/http-signature/sshpk/jsbn",
"_nodeVersion": "0.12.2",
"_npmUser": {
- "email": "andyperlitch@gmail.com",
- "name": "andyperlitch"
+ "name": "andyperlitch",
+ "email": "andyperlitch@gmail.com"
},
"_npmVersion": "2.7.4",
"_phantomChildren": {},
"_requested": {
- "name": "jsbn",
- "raw": "jsbn@>=0.1.0 <0.2.0",
- "rawSpec": ">=0.1.0 <0.2.0",
+ "raw": "jsbn@~0.1.0",
"scope": null,
+ "escapedName": "jsbn",
+ "name": "jsbn",
+ "rawSpec": "~0.1.0",
"spec": ">=0.1.0 <0.2.0",
"type": "range"
},
@@ -33,8 +42,8 @@
"_resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz",
"_shasum": "650987da0dd74f4ebf5a11377a2aa2d273e97dfd",
"_shrinkwrap": null,
- "_spec": "jsbn@>=0.1.0 <0.2.0",
- "_where": "/Users/ogd/Documents/projects/npm/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
+ "_spec": "jsbn@~0.1.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
"name": "Tom Wu"
},
@@ -47,14 +56,14 @@
"directories": {},
"dist": {
"shasum": "650987da0dd74f4ebf5a11377a2aa2d273e97dfd",
- "tarball": "http://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz"
+ "tarball": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.0.tgz"
},
"gitHead": "148a967b112806e63ddeeed78ee7938eef74c84a",
"homepage": "https://github.com/andyperlitch/jsbn",
"keywords": [
- "big",
"biginteger",
"bignumber",
+ "big",
"integer"
],
"license": "BSD",
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md
index 3ebc0affaa..77c69bd5ee 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/CHANGELOG.md
@@ -2,59 +2,6 @@ TweetNaCl.js Changelog
======================
-v0.14.1
--------
-
-No code changes, just tweaked packaging and added COPYING.txt.
-
-
-v0.14.0
--------
-
-* **Breaking change!** All functions from `nacl.util` have been removed. These
- functions are no longer available:
-
- nacl.util.decodeUTF8
- nacl.util.encodeUTF8
- nacl.util.decodeBase64
- nacl.util.encodeBase64
-
- If want to continue using them, you can include
- <https://github.com/dchest/tweetnacl-util-js> package:
-
- <script src="nacl.min.js"></script>
- <script src="nacl-util.min.js"></script>
-
- or
-
- var nacl = require('tweetnacl');
- nacl.util = require('tweetnacl-util');
-
- However it is recommended to use better packages that have wider
- compatibility and better performance. Functions from `nacl.util` were never
- intended to be robust solution for string conversion and were included for
- convenience: cryptography library is not the right place for them.
-
- Currently calling these functions will throw error pointing to
- `tweetnacl-util-js` (in the next version this error message will be removed).
-
-* Improved detection of available random number generators, making it possible
- to use `nacl.randomBytes` and related functions in Web Workers without
- changes.
-
-* Changes to testing (see README).
-
-
-v0.13.3
--------
-
-No code changes.
-
-* Reverted license field in package.json to "Public domain".
-
-* Fixed typo in README.
-
-
v0.13.2
-------
@@ -141,18 +88,18 @@ v0.10.0
* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal
with signed messages, and new `nacl.sign.detached` and
`nacl.sign.detached.verify` are available.
-
+
Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a
message and "detached" signature. This was unlike NaCl's API, which dealt with
signed messages (concatenation of signature and message).
-
+
The new API is:
nacl.sign(message, secretKey) -> signedMessage
nacl.sign.open(signedMessage, publicKey) -> message | null
Since detached signatures are common, two new API functions were introduced:
-
+
nacl.sign.detached(message, secretKey) -> signature
nacl.sign.detached.verify(message, signature, publicKey) -> true | false
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
deleted file mode 100644
index c2bd1e5b7e..0000000000
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/COPYING.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-Public Domain
-
-The person who associated a work with this deed has dedicated the work to the
-public domain by waiving all of his or her rights to the work worldwide under
-copyright law, including all related and neighboring rights, to the extent
-allowed by law.
-
-You can copy, modify, distribute and perform the work, even for commercial
-purposes, all without asking permission.
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md
index c80bbed8d8..11bd3472c2 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/README.md
@@ -7,7 +7,7 @@ to JavaScript for modern browsers and Node.js. Public domain.
[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master)
](https://travis-ci.org/dchest/tweetnacl-js)
-Demo: <https://tweetnacl.js.org>
+[Demo](https://dchest.github.io/tweetnacl-js/)
**:warning: Beta version. The library is stable and API is frozen, however
it has not been independently reviewed. If you can help reviewing it, please
@@ -26,6 +26,8 @@ Documentation
* [Hashing](#hashing)
* [Random bytes generation](#random-bytes-generation)
* [Constant-time comparison](#constant-time-comparison)
+ * [Utilities](#utilities)
+* [Examples](#examples)
* [System requirements](#system-requirements)
* [Development and testing](#development-and-testing)
* [Contributors](#contributors)
@@ -65,20 +67,10 @@ or [download source code](https://github.com/dchest/tweetnacl-js/releases).
Usage
------
+------
All API functions accept and return bytes as `Uint8Array`s. If you need to
-encode or decode strings, use functions from
-<https://github.com/dchest/tweetnacl-util-js> or one of the more robust codec
-packages.
-
-In Node.js v4 and later `Buffer` objects are backed by `Uint8Array`s, so you
-can freely pass them to TweetNaCl.js functions as arguments. The returned
-objects are still `Uint8Array`s, so if you need `Buffer`s, you'll have to
-convert them manually; make sure to convert using copying: `new Buffer(array)`,
-instead of sharing: `new Buffer(array.buffer)`, because some functions return
-subarrays of their buffers.
-
+encode or decode strings, use functions from `nacl.util` namespace.
### Public-key authenticated encryption (box)
@@ -295,6 +287,12 @@ depending on the platform it runs on:
* `window.msCrypto.getRandomValues` (Internet Explorer 11)
* `crypto.randomBytes` (Node.js)
+Note that browsers are required to throw `QuotaExceededError` exception if
+requested `length` is more than 65536, so do not ask for more than 65536 bytes
+in *one call* (multiple calls to get as many bytes as you like are okay:
+browsers can generate infinite amount of random bytes without any bad
+consequences).
+
If the platform doesn't provide a suitable PRNG, the following functions,
which require random numbers, will throw exception:
@@ -328,6 +326,30 @@ Returns `false` if either of the arguments has zero length, or arguments have
different lengths, or their contents differ.
+### Utilities
+
+Encoding/decoding functions are provided for convenience. They are correct,
+however their performance and wide compatibility with uncommon runtimes is not
+something that is considered important compared to the simplicity and size of
+implementation. You can use third-party libraries if you need to.
+
+#### nacl.util.decodeUTF8(string)
+
+Decodes string and returns `Uint8Array` of bytes.
+
+#### nacl.util.encodeUTF8(array)
+
+Encodes `Uint8Array` or `Array` of bytes into string.
+
+#### nacl.util.decodeBase64(string)
+
+Decodes Base-64 encoded string and returns `Uint8Array` of bytes.
+
+#### nacl.util.encodeBase64(array)
+
+Encodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding.
+
+
System requirements
-------------------
@@ -342,7 +364,7 @@ of:
Other systems:
-* Node.js
+* Node.js (we test on 0.10 and later)
Development and testing
@@ -363,36 +385,32 @@ Tests use minified version, so make sure to rebuild it every time you change
To run tests in Node.js:
- $ npm run test-node
+ $ npm test
By default all tests described here work on `nacl.min.js`. To test other
versions, set environment variable `NACL_SRC` to the file name you want to test.
For example, the following command will test fast minified version:
- $ NACL_SRC=nacl-fast.min.js npm run test-node
+ $ NACL_SRC=nacl-fast.min.js npm test
To run full suite of tests in Node.js, including comparing outputs of
JavaScript port to outputs of the original C version:
- $ npm run test-node-all
+ $ npm run testall
To prepare tests for browsers:
- $ npm run build-test-browser
+ $ npm run browser
and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to
run them.
-To run headless browser tests with `tape-run` (powered by Electron):
+To run headless browser tests with `testling`:
- $ npm run test-browser
+ $ npm run testling
(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.)
-To run tests in both Node and Electron:
-
- $ npm test
-
### Benchmarking
To run benchmarks in Node.js:
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js
index 5e4562fe89..6c4995848c 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.js
@@ -745,7 +745,7 @@ poly1305.prototype.finish = function(mac, macpos) {
}
g[9] -= (1 << 13);
- mask = (c ^ 1) - 1;
+ mask = (g[9] >>> ((2 * 8) - 1)) - 1;
for (i = 0; i < 10; i++) g[i] &= mask;
mask = ~mask;
for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i];
@@ -2157,13 +2157,39 @@ function cleanup(arr) {
for (var i = 0; i < arr.length; i++) arr[i] = 0;
}
-// TODO: Completely remove this in v0.15.
-if (!nacl.util) {
- nacl.util = {};
- nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() {
- throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js');
- };
-}
+nacl.util = {};
+
+nacl.util.decodeUTF8 = function(s) {
+ var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length);
+ for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
+ return b;
+};
+
+nacl.util.encodeUTF8 = function(arr) {
+ var i, s = [];
+ for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i]));
+ return decodeURIComponent(escape(s.join('')));
+};
+
+nacl.util.encodeBase64 = function(arr) {
+ if (typeof btoa === 'undefined') {
+ return (new Buffer(arr)).toString('base64');
+ } else {
+ var i, s = [], len = arr.length;
+ for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i]));
+ return btoa(s.join(''));
+ }
+};
+
+nacl.util.decodeBase64 = function(s) {
+ if (typeof atob === 'undefined') {
+ return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0));
+ } else {
+ var i, d = atob(s), b = new Uint8Array(d.length);
+ for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
+ return b;
+ }
+};
nacl.randomBytes = function(n) {
var b = new Uint8Array(n);
@@ -2360,22 +2386,26 @@ nacl.setPRNG = function(fn) {
(function() {
// Initialize PRNG if environment provides CSPRNG.
// If not, methods calling randombytes will throw.
- var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;
- if (crypto && crypto.getRandomValues) {
- // Browsers.
- var QUOTA = 65536;
- nacl.setPRNG(function(x, n) {
- var i, v = new Uint8Array(n);
- for (i = 0; i < n; i += QUOTA) {
- crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
- }
- for (i = 0; i < n; i++) x[i] = v[i];
- cleanup(v);
- });
+ var crypto;
+ if (typeof window !== 'undefined') {
+ // Browser.
+ if (window.crypto && window.crypto.getRandomValues) {
+ crypto = window.crypto; // Standard
+ } else if (window.msCrypto && window.msCrypto.getRandomValues) {
+ crypto = window.msCrypto; // Internet Explorer 11+
+ }
+ if (crypto) {
+ nacl.setPRNG(function(x, n) {
+ var i, v = new Uint8Array(n);
+ crypto.getRandomValues(v);
+ for (i = 0; i < n; i++) x[i] = v[i];
+ cleanup(v);
+ });
+ }
} else if (typeof require !== 'undefined') {
// Node.js.
crypto = require('crypto');
- if (crypto && crypto.randomBytes) {
+ if (crypto) {
nacl.setPRNG(function(x, n) {
var i, v = crypto.randomBytes(n);
for (i = 0; i < n; i++) x[i] = v[i];
@@ -2385,4 +2415,4 @@ nacl.setPRNG = function(fn) {
}
})();
-})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
+})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {}));
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js
index 624fbbe91e..7072c2af44 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl-fast.min.js
@@ -1,2 +1,2 @@
-!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;o>i;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;20>O;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;d=d+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+u|0,B=B+c|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+v|0,L=L+b|0,z=z+g|0,R=R+_|0,P=P+A|0,r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=z>>>0&255,r[53]=z>>>8&255,r[54]=z>>>16&255,r[55]=z>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=P>>>0&255,r[61]=P>>>8&255,r[62]=P>>>16&255,r[63]=P>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;20>O;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=P>>>0&255,r[13]=P>>>8&255,r[14]=P>>>16&255,r[15]=P>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,u=new Uint8Array(16),c=new Uint8Array(64);for(s=0;16>s;s++)u[s]=0;for(s=0;8>s;s++)u[s]=i[s];for(;o>=64;){for(a(c,u,h,cr),s=0;64>s;s++)r[t+s]=n[e+s]^c[s];for(f=1,s=8;16>s;s++)f=f+(255&u[s])|0,u[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,cr),s=0;o>s;s++)r[t+s]=n[e+s]^c[s];return 0}function u(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;16>h;h++)f[h]=0;for(h=0;8>h;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,cr),h=0;64>h;h++)r[t+h]=s[h];for(i=1,h=8;16>h;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,cr),h=0;n>h;h++)r[t+h]=s[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,cr);for(var h=new Uint8Array(8),a=0;8>a;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,cr);for(var u=new Uint8Array(8),c=0;8>c;c++)u[c]=i[c+16];return s(r,t,n,e,o,u,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(32>n)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;16>i;i++)r[i]=0;return 0}function v(r,t,n,e,o){var i,h=new Uint8Array(32);if(32>n)return-1;if(c(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;32>i;i++)r[i]=0;return 0}function b(r,t){var n;for(n=0;16>n;n++)r[n]=0|t[n]}function g(r){var t,n,e=1;for(t=0;16>t;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function _(r,t,n){for(var e,o=~(n-1),i=0;16>i;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;16>n;n++)h[n]=t[n];for(g(h),g(h),g(h),e=0;2>e;e++){for(i[0]=h[0]-65517,n=1;15>n;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,_(h,i,1-o)}for(n=0;16>n;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function d(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;16>n;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,v=0,b=0,g=0,_=0,A=0,d=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,z=0,R=0,P=n[0],O=n[1],N=n[2],C=n[3],F=n[4],I=n[5],G=n[6],Z=n[7],j=n[8],q=n[9],V=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*P,h+=e*O,a+=e*N,f+=e*C,s+=e*F,u+=e*I,c+=e*G,y+=e*Z,l+=e*j,w+=e*q,p+=e*V,v+=e*X,b+=e*D,g+=e*H,_+=e*J,A+=e*Q,e=t[1],h+=e*P,a+=e*O,f+=e*N,s+=e*C,u+=e*F,c+=e*I,y+=e*G,l+=e*Z,w+=e*j,p+=e*q,v+=e*V,b+=e*X,g+=e*D,_+=e*H,A+=e*J,d+=e*Q,e=t[2],a+=e*P,f+=e*O,s+=e*N,u+=e*C,c+=e*F,y+=e*I,l+=e*G,w+=e*Z,p+=e*j,v+=e*q,b+=e*V,g+=e*X,_+=e*D,A+=e*H,d+=e*J,U+=e*Q,e=t[3],f+=e*P,s+=e*O,u+=e*N,c+=e*C,y+=e*F,l+=e*I,w+=e*G,p+=e*Z,v+=e*j,b+=e*q,g+=e*V,_+=e*X,A+=e*D,d+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*P,u+=e*O,c+=e*N,y+=e*C,l+=e*F,w+=e*I,p+=e*G,v+=e*Z,b+=e*j,g+=e*q,_+=e*V,A+=e*X,d+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],u+=e*P,c+=e*O,y+=e*N,l+=e*C,w+=e*F,p+=e*I,v+=e*G,b+=e*Z,g+=e*j,_+=e*q,A+=e*V,d+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],c+=e*P,y+=e*O,l+=e*N,w+=e*C,p+=e*F,v+=e*I,b+=e*G,g+=e*Z,_+=e*j,A+=e*q,d+=e*V,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*P,l+=e*O,w+=e*N,p+=e*C,v+=e*F,b+=e*I,g+=e*G,_+=e*Z,A+=e*j,d+=e*q,U+=e*V,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*P,w+=e*O,p+=e*N,v+=e*C,b+=e*F,g+=e*I,_+=e*G,A+=e*Z,d+=e*j,U+=e*q,E+=e*V,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*P,p+=e*O,v+=e*N,b+=e*C,g+=e*F,_+=e*I,A+=e*G,d+=e*Z,U+=e*j,E+=e*q,x+=e*V,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*P,v+=e*O,b+=e*N,g+=e*C,_+=e*F,A+=e*I,d+=e*G,U+=e*Z,E+=e*j,x+=e*q,M+=e*V,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],v+=e*P,b+=e*O,g+=e*N,_+=e*C,A+=e*F,d+=e*I,U+=e*G,E+=e*Z,x+=e*j,M+=e*q,m+=e*V,B+=e*X,S+=e*D,K+=e*H,T+=e*J,Y+=e*Q,e=t[12],b+=e*P,g+=e*O,_+=e*N,A+=e*C,d+=e*F,U+=e*I,E+=e*G,x+=e*Z,M+=e*j,m+=e*q,B+=e*V,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],g+=e*P,_+=e*O,A+=e*N,d+=e*C,U+=e*F,E+=e*I,x+=e*G,M+=e*Z,m+=e*j,B+=e*q,S+=e*V,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],_+=e*P,A+=e*O,d+=e*N,U+=e*C,E+=e*F,x+=e*I,M+=e*G,m+=e*Z,B+=e*j,S+=e*q,K+=e*V,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,z+=e*Q,e=t[15],A+=e*P,d+=e*O,U+=e*N,E+=e*C,x+=e*F,M+=e*I,m+=e*G,B+=e*Z,S+=e*j,K+=e*q,T+=e*V,Y+=e*X,k+=e*D,L+=e*H,z+=e*J,R+=e*Q,i+=38*d,h+=38*U,a+=38*E,f+=38*x,s+=38*M,u+=38*m,c+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,v+=38*k,b+=38*L,g+=38*z,_+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=v,r[12]=b,r[13]=g,r[14]=_,r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),u=$(),c=$(),y=$();for(o=0;31>o;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;16>o;o++)f[o]=h[o],u[o]=a[o]=s[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,_(a,f,e),_(s,u,e),x(c,a,s),M(a,a,s),x(s,f,u),M(f,f,u),B(u,c),B(y,a),m(a,s,a),m(s,f,c),x(c,a,s),M(a,a,s),B(f,a),M(s,u,y),m(a,s,ir),x(a,a,u),m(s,s,a),m(a,u,y),m(u,f,h),B(f,c),_(a,f,e),_(s,u,e);for(o=0;16>o;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=u[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,cr)}function z(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function P(r,t,n,e){for(var o,i,h,a,f,s,u,c,y,l,w,p,v,b,g,_,A,d,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],z=r[2],R=r[3],P=r[4],O=r[5],N=r[6],C=r[7],F=t[0],I=t[1],G=t[2],Z=t[3],j=t[4],q=t[5],V=t[6],X=t[7],D=0;e>=128;){for(U=0;16>U;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;80>U;U++)if(o=k,i=L,h=z,a=R,f=P,s=O,u=N,c=C,y=F,l=I,w=G,p=Z,v=j,b=q,g=V,_=X,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(P>>>14|j<<18)^(P>>>18|j<<14)^(j>>>9|P<<23),M=(j>>>14|P<<18)^(j>>>18|P<<14)^(P>>>9|j<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=P&O^~P&N,M=j&q^~j&V,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,d=65535&m|B<<16,x=A,M=d,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&z^L&z,M=F&I^F&G^I&G,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,c=65535&S|K<<16,_=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=d,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,z=i,R=h,P=a,O=f,N=s,C=u,k=c,I=y,G=l,Z=w,j=p,q=v,V=b,X=g,F=_,U%16===15)for(E=0;16>E;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],d=Y[(E+1)%16],x=(A>>>1|d<<31)^(A>>>8|d<<24)^A>>>7,M=(d>>>1|A<<31)^(d>>>8|A<<24)^(d>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],d=Y[(E+14)%16],x=(A>>>19|d<<13)^(d>>>29|A<<3)^A>>>6,M=(d>>>19|A<<13)^(A>>>29|d<<3)^(d>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=z,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=z=65535&S|K<<16,t[2]=G=65535&m|B<<16,x=R,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=Z=65535&m|B<<16,x=P,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=P=65535&S|K<<16,t[4]=j=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=O=65535&S|K<<16,t[5]=q=65535&m|B<<16,x=N,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=N=65535&S|K<<16,t[6]=V=65535&m|B<<16,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=C=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function O(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,P(i,h,n,e),e%=128,o=0;e>o;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),P(i,h,a,e),o=0;8>o;o++)t(r,8*o,i[o],h[o]);return 0}function N(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),u=$();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function C(r,t,n){var e;for(e=0;4>e;e++)_(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(b(r[0],er),b(r[1],or),b(r[2],or),b(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,C(r,t,e),N(t,r),N(r,r),C(r,t,e)}function G(r,t){var n=[$(),$(),$(),$()];b(n[0],fr),b(n[1],sr),b(n[2],or),m(n[3],fr,sr),I(r,n,t)}function Z(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),O(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,G(i,o),F(r,i),e=0;32>e;e++)t[e+32]=r[e];return 0}function j(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;i>o;++o)t[o]+=n-16*t[e]*vr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;32>o;o++)t[o]+=n-(t[31]>>4)*vr[o],n=t[o]>>8,t[o]&=255;for(o=0;32>o;o++)t[o]-=n*vr[o];for(e=0;32>e;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function q(r){var t,n=new Float64Array(64);for(t=0;64>t;t++)n[t]=r[t];for(t=0;64>t;t++)r[t]=0;j(r,n)}function V(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),u=[$(),$(),$(),$()];O(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;n>o;o++)r[64+o]=t[o];for(o=0;32>o;o++)r[32+o]=h[32+o];for(O(f,r.subarray(32),n+32),q(f),G(u,f),F(r,u),o=32;64>o;o++)r[o]=e[o];for(O(a,r,n+64),q(a),o=0;64>o;o++)s[o]=0;for(o=0;32>o;o++)s[o]=f[o];for(o=0;32>o;o++)for(i=0;32>i;i++)s[o+i]+=a[o]*h[i];return j(r.subarray(32),s),c}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return b(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),d(e,o)&&m(r[0],r[0],ur),B(e,r[0]),m(e,e,i),d(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],u=[$(),$(),$(),$()];if(h=-1,64>n)return-1;if(X(u,e))return-1;for(i=0;n>i;i++)r[i]=t[i];for(i=0;32>i;i++)r[i+32]=e[i];if(O(f,r,n),q(f),I(s,u,f),G(u,t.subarray(32)),N(s,u),F(a,s),n-=64,o(t,0,a,0)){for(i=0;n>i;i++)r[i]=0;return-1}for(i=0;n>i;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==br)throw new Error("bad key size");if(t.length!==gr)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function W(r){for(var t=0;t<r.length;t++)r[t]=0}var $=function(r){var t,n=new Float64Array(16);if(r)for(t=0;t<r.length;t++)n[t]=r[t];return n},rr=function(){throw new Error("no PRNG")},tr=new Uint8Array(16),nr=new Uint8Array(32);nr[0]=9;var er=$(),or=$([1]),ir=$([56129,1]),hr=$([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),ar=$([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),fr=$([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),sr=$([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),ur=$([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),cr=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),yr=function(r){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var t,n,e,o,i,h,a,f;t=255&r[0]|(255&r[1])<<8,this.r[0]=8191&t,n=255&r[2]|(255&r[3])<<8,this.r[1]=8191&(t>>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w,p,v,b,g,_,A,d,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],z=this.r[1],R=this.r[2],P=this.r[3],O=this.r[4],N=this.r[5],C=this.r[6],F=this.r[7],I=this.r[8],G=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),u=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|u<<8),k+=u>>>5|U,c=0,y=c,y+=E*L,y+=x*(5*G),y+=M*(5*I),y+=m*(5*F),y+=B*(5*C),c=y>>>13,y&=8191,y+=S*(5*N),y+=K*(5*O),y+=T*(5*P),y+=Y*(5*R),y+=k*(5*z),c+=y>>>13,y&=8191,l=c,l+=E*z,l+=x*L,l+=M*(5*G),l+=m*(5*I),l+=B*(5*F),c=l>>>13,l&=8191,l+=S*(5*C),l+=K*(5*N),l+=T*(5*O),l+=Y*(5*P),l+=k*(5*R),c+=l>>>13,l&=8191,w=c,w+=E*R,w+=x*z,w+=M*L,w+=m*(5*G),w+=B*(5*I),c=w>>>13,w&=8191,w+=S*(5*F),w+=K*(5*C),w+=T*(5*N),w+=Y*(5*O),w+=k*(5*P),c+=w>>>13,w&=8191,p=c,p+=E*P,p+=x*R,p+=M*z,p+=m*L,p+=B*(5*G),c=p>>>13,p&=8191,p+=S*(5*I),p+=K*(5*F),p+=T*(5*C),p+=Y*(5*N),p+=k*(5*O),c+=p>>>13,p&=8191,v=c,v+=E*O,v+=x*P,v+=M*R,v+=m*z,v+=B*L,c=v>>>13,v&=8191,v+=S*(5*G),v+=K*(5*I),v+=T*(5*F),v+=Y*(5*C),v+=k*(5*N),c+=v>>>13,v&=8191,b=c,b+=E*N,b+=x*O,b+=M*P,b+=m*R,b+=B*z,c=b>>>13,b&=8191,b+=S*L,b+=K*(5*G),b+=T*(5*I),b+=Y*(5*F),b+=k*(5*C),c+=b>>>13,b&=8191,g=c,g+=E*C,g+=x*N,g+=M*O,g+=m*P,g+=B*R,c=g>>>13,g&=8191,g+=S*z,g+=K*L,g+=T*(5*G),g+=Y*(5*I),g+=k*(5*F),c+=g>>>13,g&=8191,_=c,_+=E*F,_+=x*C,_+=M*N,_+=m*O,_+=B*P,c=_>>>13,_&=8191,_+=S*R,_+=K*z,_+=T*L,_+=Y*(5*G),_+=k*(5*I),c+=_>>>13,_&=8191,A=c,A+=E*I,A+=x*F,A+=M*C,A+=m*N,A+=B*O,c=A>>>13,A&=8191,A+=S*P,A+=K*R,A+=T*z,A+=Y*L,A+=k*(5*G),c+=A>>>13,A&=8191,d=c,d+=E*G,d+=x*I,d+=M*F,d+=m*C,d+=B*N,c=d>>>13,d&=8191,d+=S*O,d+=K*P,d+=T*R,d+=Y*z,d+=k*L,c+=d>>>13,d&=8191,c=(c<<2)+c|0,c=c+y|0,y=8191&c,c>>>=13,l+=c,E=y,x=l,M=w,m=p,B=v,S=b,K=g,T=_,Y=A,k=d,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;16>i;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;10>i;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;10>i;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;10>i;i++)h[i]&=e;for(e=~e,i=0;10>i;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;8>i;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;o>e;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;n>e;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=v,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],vr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),br=32,gr=24,_r=32,Ar=16,dr=32,Ur=32,Er=32,xr=32,Mr=32,mr=gr,Br=_r,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:c,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:u,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:v,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:z,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:O,crypto_sign:V,crypto_sign_keypair:Z,crypto_sign_open:D,crypto_secretbox_KEYBYTES:br,crypto_secretbox_NONCEBYTES:gr,crypto_secretbox_ZEROBYTES:_r,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:dr,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util||(r.util={},r.util.decodeUTF8=r.util.encodeUTF8=r.util.encodeBase64=r.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),r.randomBytes=function(r){var t=new Uint8Array(r);return rr(t,r),t},r.secretbox=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(_r+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+_r]=r[i];return p(o,e,e.length,t,n),o.subarray(Ar)},r.secretbox.open=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(Ar+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+Ar]=r[i];return e.length<32?!1:0!==v(o,e,e.length,t,n)?!1:o.subarray(_r)},r.secretbox.keyLength=br,r.secretbox.nonceLength=gr,r.secretbox.overheadLength=Ar,r.scalarMult=function(r,t){if(Q(r,t),r.length!==Ur)throw new Error("bad n size");if(t.length!==dr)throw new Error("bad p size");var n=new Uint8Array(dr);return T(n,r,t),n},r.scalarMult.base=function(r){if(Q(r),r.length!==Ur)throw new Error("bad n size");var t=new Uint8Array(dr);return Y(t,r),t},r.scalarMult.scalarLength=Ur,r.scalarMult.groupElementLength=dr,r.box=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox(t,n,i)},r.box.before=function(r,t){Q(r,t),J(r,t);var n=new Uint8Array(Mr);return L(n,r,t),n},r.box.after=r.secretbox,r.box.open=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox.open(t,n,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Er),t=new Uint8Array(xr);return k(r,t),{publicKey:r,secretKey:t}},r.box.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==xr)throw new Error("bad secret key size");var t=new Uint8Array(Er);return Y(t,r),{publicKey:t,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Er,r.box.secretKeyLength=xr,r.box.sharedKeyLength=Mr,r.box.nonceLength=mr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,t){if(Q(r,t),t.length!==Yr)throw new Error("bad secret key size");var n=new Uint8Array(Kr+r.length);return V(n,r,r.length,t),n},r.sign.open=function(r,t){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(Q(r,t),t.length!==Tr)throw new Error("bad public key size");var n=new Uint8Array(r.length),e=D(n,r,r.length,t);if(0>e)return null;for(var o=new Uint8Array(e),i=0;i<o.length;i++)o[i]=n[i];return o},r.sign.detached=function(t,n){for(var e=r.sign(t,n),o=new Uint8Array(Kr),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached.verify=function(r,t,n){if(Q(r,t,n),t.length!==Kr)throw new Error("bad signature size");if(n.length!==Tr)throw new Error("bad public key size");var e,o=new Uint8Array(Kr+r.length),i=new Uint8Array(Kr+r.length);for(e=0;Kr>e;e++)o[e]=t[e];for(e=0;e<r.length;e++)o[e+Kr]=r[e];return D(i,o,o.length,n)>=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return Z(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;n<t.length;n++)t[n]=r[32+n];return{publicKey:t,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(Q(r),r.length!==kr)throw new Error("bad seed size");for(var t=new Uint8Array(Tr),n=new Uint8Array(Yr),e=0;32>e;e++)n[e]=r[e];return Z(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return O(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t),
-0===r.length||0===t.length?!1:r.length!==t.length?!1:0===n(r,0,t,0,r.length)?!0:!1},r.setPRNG=function(r){rr=r},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){var n=65536;r.setPRNG(function(r,e){var o,i=new Uint8Array(e);for(o=0;e>o;o+=n)t.getRandomValues(i.subarray(o,o+Math.min(e-o,n)));for(o=0;e>o;o++)r[o]=i[o];W(i)})}else"undefined"!=typeof require&&(t=require("crypto"),t&&t.randomBytes&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;n>e;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{}); \ No newline at end of file
+!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;o>i;i++)h|=r[t+i]^n[e+i];return(1&h-1>>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;_=_+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+u|0,B=B+c|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+g|0,L=L+v|0,C=C+b|0,R=R+d|0,z=z+A|0,r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=C>>>0&255,r[53]=C>>>8&255,r[54]=C>>>16&255,r[55]=C>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=z>>>0&255,r[61]=z>>>8&255,r[62]=z>>>16&255,r[63]=z>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,d=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=i,U=h,E=a,x=f,M=s,m=u,B=c,S=y,K=l,T=w,Y=p,k=g,L=v,C=b,R=d,z=A,P=0;20>P;P+=2)o=_+L|0,M^=o<<7|o>>>25,o=M+_|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,_^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,C^=o<<9|o>>>23,o=C+T|0,U^=o<<13|o>>>19,o=U+C|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=z+k|0,x^=o<<7|o>>>25,o=x+z|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,z^=o<<18|o>>>14,o=_+x|0,U^=o<<7|o>>>25,o=U+_|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,_^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=z+R|0,L^=o<<7|o>>>25,o=L+z|0,C^=o<<9|o>>>23,o=C+L|0,R^=o<<13|o>>>19,o=R+C|0,z^=o<<18|o>>>14;r[0]=_>>>0&255,r[1]=_>>>8&255,r[2]=_>>>16&255,r[3]=_>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=z>>>0&255,r[13]=z>>>8&255,r[14]=z>>>16&255,r[15]=z>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,u=new Uint8Array(16),c=new Uint8Array(64);for(s=0;16>s;s++)u[s]=0;for(s=0;8>s;s++)u[s]=i[s];for(;o>=64;){for(a(c,u,h,cr),s=0;64>s;s++)r[t+s]=n[e+s]^c[s];for(f=1,s=8;16>s;s++)f=f+(255&u[s])|0,u[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(c,u,h,cr),s=0;o>s;s++)r[t+s]=n[e+s]^c[s];return 0}function u(r,t,n,e,o){var i,h,f=new Uint8Array(16),s=new Uint8Array(64);for(h=0;16>h;h++)f[h]=0;for(h=0;8>h;h++)f[h]=e[h];for(;n>=64;){for(a(s,f,o,cr),h=0;64>h;h++)r[t+h]=s[h];for(i=1,h=8;16>h;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,cr),h=0;n>h;h++)r[t+h]=s[h];return 0}function c(r,t,n,e,o){var i=new Uint8Array(32);f(i,e,o,cr);for(var h=new Uint8Array(8),a=0;8>a;a++)h[a]=e[a+16];return u(r,t,n,h,i)}function y(r,t,n,e,o,i,h){var a=new Uint8Array(32);f(a,i,h,cr);for(var u=new Uint8Array(8),c=0;8>c;c++)u[c]=i[c+16];return s(r,t,n,e,o,u,a)}function l(r,t,n,e,o,i){var h=new yr(i);return h.update(n,e,o),h.finish(r,t),0}function w(r,t,n,o,i,h){var a=new Uint8Array(16);return l(a,0,n,o,i,h),e(r,t,a,0)}function p(r,t,n,e,o){var i;if(32>n)return-1;for(y(r,0,t,0,n,e,o),l(r,16,r,32,n-32,r),i=0;16>i;i++)r[i]=0;return 0}function g(r,t,n,e,o){var i,h=new Uint8Array(32);if(32>n)return-1;if(c(h,0,32,e,o),0!==w(t,16,t,32,n-32,h))return-1;for(y(r,0,t,0,n,e,o),i=0;32>i;i++)r[i]=0;return 0}function v(r,t){var n;for(n=0;16>n;n++)r[n]=0|t[n]}function b(r){var t,n,e=1;for(t=0;16>t;t++)n=r[t]+e+65535,e=Math.floor(n/65536),r[t]=n-65536*e;r[0]+=e-1+37*(e-1)}function d(r,t,n){for(var e,o=~(n-1),i=0;16>i;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function A(r,t){var n,e,o,i=$(),h=$();for(n=0;16>n;n++)h[n]=t[n];for(b(h),b(h),b(h),e=0;2>e;e++){for(i[0]=h[0]-65517,n=1;15>n;n++)i[n]=h[n]-65535-(i[n-1]>>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(h,i,1-o)}for(n=0;16>n;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function _(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;16>n;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;16>e;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,g=0,v=0,b=0,d=0,A=0,_=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,C=0,R=0,z=n[0],P=n[1],O=n[2],N=n[3],F=n[4],I=n[5],j=n[6],G=n[7],Z=n[8],V=n[9],q=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*z,h+=e*P,a+=e*O,f+=e*N,s+=e*F,u+=e*I,c+=e*j,y+=e*G,l+=e*Z,w+=e*V,p+=e*q,g+=e*X,v+=e*D,b+=e*H,d+=e*J,A+=e*Q,e=t[1],h+=e*z,a+=e*P,f+=e*O,s+=e*N,u+=e*F,c+=e*I,y+=e*j,l+=e*G,w+=e*Z,p+=e*V,g+=e*q,v+=e*X,b+=e*D,d+=e*H,A+=e*J,_+=e*Q,e=t[2],a+=e*z,f+=e*P,s+=e*O,u+=e*N,c+=e*F,y+=e*I,l+=e*j,w+=e*G,p+=e*Z,g+=e*V,v+=e*q,b+=e*X,d+=e*D,A+=e*H,_+=e*J,U+=e*Q,e=t[3],f+=e*z,s+=e*P,u+=e*O,c+=e*N,y+=e*F,l+=e*I,w+=e*j,p+=e*G,g+=e*Z,v+=e*V,b+=e*q,d+=e*X,A+=e*D,_+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*z,u+=e*P,c+=e*O,y+=e*N,l+=e*F,w+=e*I,p+=e*j,g+=e*G,v+=e*Z,b+=e*V,d+=e*q,A+=e*X,_+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],u+=e*z,c+=e*P,y+=e*O,l+=e*N,w+=e*F,p+=e*I,g+=e*j,v+=e*G,b+=e*Z,d+=e*V,A+=e*q,_+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],c+=e*z,y+=e*P,l+=e*O,w+=e*N,p+=e*F,g+=e*I,v+=e*j,b+=e*G,d+=e*Z,A+=e*V,_+=e*q,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*z,l+=e*P,w+=e*O,p+=e*N,g+=e*F,v+=e*I,b+=e*j,d+=e*G,A+=e*Z,_+=e*V,U+=e*q,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*z,w+=e*P,p+=e*O,g+=e*N,v+=e*F,b+=e*I,d+=e*j,A+=e*G,_+=e*Z,U+=e*V,E+=e*q,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*z,p+=e*P,g+=e*O,v+=e*N,b+=e*F,d+=e*I,A+=e*j,_+=e*G,U+=e*Z,E+=e*V,x+=e*q,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*z,g+=e*P,v+=e*O,b+=e*N,d+=e*F,A+=e*I,_+=e*j,U+=e*G,E+=e*Z,x+=e*V,M+=e*q,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],g+=e*z,v+=e*P,b+=e*O,d+=e*N,A+=e*F,_+=e*I,U+=e*j,E+=e*G,x+=e*Z,M+=e*V,m+=e*q,B+=e*X,S+=e*D,K+=e*H,T+=e*J,Y+=e*Q,e=t[12],v+=e*z,b+=e*P,d+=e*O,A+=e*N,_+=e*F,U+=e*I,E+=e*j,x+=e*G,M+=e*Z,m+=e*V,B+=e*q,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],b+=e*z,d+=e*P,A+=e*O,_+=e*N,U+=e*F,E+=e*I,x+=e*j,M+=e*G,m+=e*Z,B+=e*V,S+=e*q,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],d+=e*z,A+=e*P,_+=e*O,U+=e*N,E+=e*F,x+=e*I,M+=e*j,m+=e*G,B+=e*Z,S+=e*V,K+=e*q,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,C+=e*Q,e=t[15],A+=e*z,_+=e*P,U+=e*O,E+=e*N,x+=e*F,M+=e*I,m+=e*j,B+=e*G,S+=e*Z,K+=e*V,T+=e*q,Y+=e*X,k+=e*D,L+=e*H,C+=e*J,R+=e*Q,i+=38*_,h+=38*U,a+=38*E,f+=38*x,s+=38*M,u+=38*m,c+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,g+=38*k,v+=38*L,b+=38*C,d+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=d+o+65535,o=Math.floor(e/65536),d=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=u,r[6]=c,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=g,r[12]=v,r[13]=b,r[14]=d,r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;16>n;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;16>n;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),u=$(),c=$(),y=$();for(o=0;31>o;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;16>o;o++)f[o]=h[o],u[o]=a[o]=s[o]=0;for(a[0]=u[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,d(a,f,e),d(s,u,e),x(c,a,s),M(a,a,s),x(s,f,u),M(f,f,u),B(u,c),B(y,a),m(a,s,a),m(s,f,c),x(c,a,s),M(a,a,s),B(f,a),M(s,u,y),m(a,s,ir),x(a,a,u),m(s,s,a),m(a,u,y),m(u,f,h),B(f,c),d(a,f,e),d(s,u,e);for(o=0;16>o;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=u[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,cr)}function C(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function z(r,t,n,e){for(var o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],C=r[2],R=r[3],z=r[4],P=r[5],O=r[6],N=r[7],F=t[0],I=t[1],j=t[2],G=t[3],Z=t[4],V=t[5],q=t[6],X=t[7],D=0;e>=128;){for(U=0;16>U;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;80>U;U++)if(o=k,i=L,h=C,a=R,f=z,s=P,u=O,c=N,y=F,l=I,w=j,p=G,g=Z,v=V,b=q,d=X,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(z>>>14|Z<<18)^(z>>>18|Z<<14)^(Z>>>9|z<<23),M=(Z>>>14|z<<18)^(Z>>>18|z<<14)^(z>>>9|Z<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=z&P^~z&O,M=Z&V^~Z&q,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,_=65535&m|B<<16,x=A,M=_,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&C^L&C,M=F&I^F&j^I&j,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,c=65535&S|K<<16,d=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=_,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,C=i,R=h,z=a,P=f,O=s,N=u,k=c,I=y,j=l,G=w,Z=p,V=g,q=v,X=b,F=d,U%16===15)for(E=0;16>E;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],_=Y[(E+1)%16],x=(A>>>1|_<<31)^(A>>>8|_<<24)^A>>>7,M=(_>>>1|A<<31)^(_>>>8|A<<24)^(_>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],_=Y[(E+14)%16],x=(A>>>19|_<<13)^(_>>>29|A<<3)^A>>>6,M=(_>>>19|A<<13)^(A>>>29|_<<3)^(_>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=C,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=C=65535&S|K<<16,t[2]=j=65535&m|B<<16,x=R,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=G=65535&m|B<<16,x=z,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=z=65535&S|K<<16,t[4]=Z=65535&m|B<<16,x=P,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=P=65535&S|K<<16,t[5]=V=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=O=65535&S|K<<16,t[6]=q=65535&m|B<<16,x=N,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=N=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function P(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,z(i,h,n,e),e%=128,o=0;e>o;o++)a[o]=n[f-e+o];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,t(a,e-8,f/536870912|0,f<<3),z(i,h,a,e),o=0;8>o;o++)t(r,8*o,i[o],h[o]);return 0}function O(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$(),s=$(),u=$();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,ar),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function N(r,t,n){var e;for(e=0;4>e;e++)d(r[e],t[e],n)}function F(r,t){var n=$(),e=$(),o=$();S(o,t[2]),m(n,t[0],o),m(e,t[1],o),A(r,e),r[31]^=U(n)<<7}function I(r,t,n){var e,o;for(v(r[0],er),v(r[1],or),v(r[2],or),v(r[3],er),o=255;o>=0;--o)e=n[o/8|0]>>(7&o)&1,N(r,t,e),O(t,r),O(r,r),N(r,t,e)}function j(r,t){var n=[$(),$(),$(),$()];v(n[0],fr),v(n[1],sr),v(n[2],or),m(n[3],fr,sr),I(r,n,t)}function G(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),P(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,j(i,o),F(r,i),e=0;32>e;e++)t[e+32]=r[e];return 0}function Z(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;i>o;++o)t[o]+=n-16*t[e]*gr[o-(e-32)],n=t[o]+128>>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;32>o;o++)t[o]+=n-(t[31]>>4)*gr[o],n=t[o]>>8,t[o]&=255;for(o=0;32>o;o++)t[o]-=n*gr[o];for(e=0;32>e;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function V(r){var t,n=new Float64Array(64);for(t=0;64>t;t++)n[t]=r[t];for(t=0;64>t;t++)r[t]=0;Z(r,n)}function q(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),u=[$(),$(),$(),$()];P(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var c=n+64;for(o=0;n>o;o++)r[64+o]=t[o];for(o=0;32>o;o++)r[32+o]=h[32+o];for(P(f,r.subarray(32),n+32),V(f),j(u,f),F(r,u),o=32;64>o;o++)r[o]=e[o];for(P(a,r,n+64),V(a),o=0;64>o;o++)s[o]=0;for(o=0;32>o;o++)s[o]=f[o];for(o=0;32>o;o++)for(i=0;32>i;i++)s[o+i]+=a[o]*h[i];return Z(r.subarray(32),s),c}function X(r,t){var n=$(),e=$(),o=$(),i=$(),h=$(),a=$(),f=$();return v(r[2],or),E(r[1],t),B(o,r[1]),m(i,o,hr),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),K(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),_(e,o)&&m(r[0],r[0],ur),B(e,r[0]),m(e,e,i),_(e,o)?-1:(U(r[0])===t[31]>>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],u=[$(),$(),$(),$()];if(h=-1,64>n)return-1;if(X(u,e))return-1;for(i=0;n>i;i++)r[i]=t[i];for(i=0;32>i;i++)r[i+32]=e[i];if(P(f,r,n),V(f),I(s,u,f),j(u,t.subarray(32)),O(s,u),F(a,s),n-=64,o(t,0,a,0)){for(i=0;n>i;i++)r[i]=0;return-1}for(i=0;n>i;i++)r[i]=t[i+64];return h=n}function H(r,t){if(r.length!==vr)throw new Error("bad key size");if(t.length!==br)throw new Error("bad nonce size")}function J(r,t){if(r.length!==Er)throw new Error("bad public key size");if(t.length!==xr)throw new Error("bad secret key size")}function Q(){var r,t;for(t=0;t<arguments.length;t++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[t])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function W(r){for(var t=0;t<r.length;t++)r[t]=0}var $=function(r){var t,n=new Float64Array(16);if(r)for(t=0;t<r.length;t++)n[t]=r[t];return n},rr=function(){throw new Error("no PRNG")},tr=new Uint8Array(16),nr=new Uint8Array(32);nr[0]=9;var er=$(),or=$([1]),ir=$([56129,1]),hr=$([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),ar=$([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),fr=$([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),sr=$([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),ur=$([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),cr=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),yr=function(r){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var t,n,e,o,i,h,a,f;t=255&r[0]|(255&r[1])<<8,this.r[0]=8191&t,n=255&r[2]|(255&r[3])<<8,this.r[1]=8191&(t>>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w,p,g,v,b,d,A,_,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],C=this.r[1],R=this.r[2],z=this.r[3],P=this.r[4],O=this.r[5],N=this.r[6],F=this.r[7],I=this.r[8],j=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),u=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|u<<8),k+=u>>>5|U,c=0,y=c,y+=E*L,y+=5*x*j,y+=5*M*I,y+=5*m*F,y+=5*B*N,c=y>>>13,y&=8191,y+=5*S*O,y+=5*K*P,y+=5*T*z,y+=5*Y*R,y+=5*k*C,c+=y>>>13,y&=8191,l=c,l+=E*C,l+=x*L,l+=5*M*j,l+=5*m*I,l+=5*B*F,c=l>>>13,l&=8191,l+=5*S*N,l+=5*K*O,l+=5*T*P,l+=5*Y*z,l+=5*k*R,c+=l>>>13,l&=8191,w=c,w+=E*R,w+=x*C,w+=M*L,w+=5*m*j,w+=5*B*I,c=w>>>13,w&=8191,w+=5*S*F,w+=5*K*N,w+=5*T*O,w+=5*Y*P,w+=5*k*z,c+=w>>>13,w&=8191,p=c,p+=E*z,p+=x*R,p+=M*C,p+=m*L,p+=5*B*j,c=p>>>13,p&=8191,p+=5*S*I,p+=5*K*F,p+=5*T*N,p+=5*Y*O,p+=5*k*P,c+=p>>>13,p&=8191,g=c,g+=E*P,g+=x*z,g+=M*R,g+=m*C,g+=B*L,c=g>>>13,g&=8191,g+=5*S*j,g+=5*K*I,g+=5*T*F,g+=5*Y*N,g+=5*k*O,c+=g>>>13,g&=8191,v=c,v+=E*O,v+=x*P,v+=M*z,v+=m*R,v+=B*C,c=v>>>13,v&=8191,v+=S*L,v+=5*K*j,v+=5*T*I,v+=5*Y*F,v+=5*k*N,c+=v>>>13,v&=8191,b=c,b+=E*N,b+=x*O,b+=M*P,b+=m*z,b+=B*R,c=b>>>13,b&=8191,b+=S*C,b+=K*L,b+=5*T*j,b+=5*Y*I,b+=5*k*F,c+=b>>>13,b&=8191,d=c,d+=E*F,d+=x*N,d+=M*O,d+=m*P,d+=B*z,c=d>>>13,d&=8191,d+=S*R,d+=K*C,d+=T*L,d+=5*Y*j,d+=5*k*I,c+=d>>>13,d&=8191,A=c,A+=E*I,A+=x*F,A+=M*N,A+=m*O,A+=B*P,c=A>>>13,A&=8191,A+=S*z,A+=K*R,A+=T*C,A+=Y*L,A+=5*k*j,c+=A>>>13,A&=8191,_=c,_+=E*j,_+=x*I,_+=M*F,_+=m*N,_+=B*O,c=_>>>13,_&=8191,_+=S*P,_+=K*z,_+=T*R,_+=Y*C,_+=k*L,c+=_>>>13,_&=8191,c=(c<<2)+c|0,c=c+y|0,y=8191&c,c>>>=13,l+=c,E=y,x=l,M=w,m=p,B=g,S=v,K=b,T=d,Y=A,k=_,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;16>i;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;10>i;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;10>i;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(h[9]>>>15)-1,i=0;10>i;i++)h[i]&=e;for(e=~e,i=0;10>i;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;8>i;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;o>e;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;n>e;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var lr=p,wr=g,pr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],gr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),vr=32,br=24,dr=32,Ar=16,_r=32,Ur=32,Er=32,xr=32,Mr=32,mr=br,Br=dr,Sr=Ar,Kr=64,Tr=32,Yr=64,kr=32,Lr=64;r.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:y,crypto_stream:c,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:u,crypto_onetimeauth:l,crypto_onetimeauth_verify:w,crypto_verify_16:e,crypto_verify_32:o,crypto_secretbox:p,crypto_secretbox_open:g,crypto_scalarmult:T,crypto_scalarmult_base:Y,crypto_box_beforenm:L,crypto_box_afternm:lr,crypto_box:C,crypto_box_open:R,crypto_box_keypair:k,crypto_hash:P,crypto_sign:q,crypto_sign_keypair:G,crypto_sign_open:D,crypto_secretbox_KEYBYTES:vr,crypto_secretbox_NONCEBYTES:br,crypto_secretbox_ZEROBYTES:dr,crypto_secretbox_BOXZEROBYTES:Ar,crypto_scalarmult_BYTES:_r,crypto_scalarmult_SCALARBYTES:Ur,crypto_box_PUBLICKEYBYTES:Er,crypto_box_SECRETKEYBYTES:xr,crypto_box_BEFORENMBYTES:Mr,crypto_box_NONCEBYTES:mr,crypto_box_ZEROBYTES:Br,crypto_box_BOXZEROBYTES:Sr,crypto_sign_BYTES:Kr,crypto_sign_PUBLICKEYBYTES:Tr,crypto_sign_SECRETKEYBYTES:Yr,crypto_sign_SEEDBYTES:kr,crypto_hash_BYTES:Lr},r.util={},r.util.decodeUTF8=function(r){var t,n=unescape(encodeURIComponent(r)),e=new Uint8Array(n.length);for(t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return e},r.util.encodeUTF8=function(r){var t,n=[];for(t=0;t<r.length;t++)n.push(String.fromCharCode(r[t]));return decodeURIComponent(escape(n.join("")))},r.util.encodeBase64=function(r){if("undefined"==typeof btoa)return new Buffer(r).toString("base64");var t,n=[],e=r.length;for(t=0;e>t;t++)n.push(String.fromCharCode(r[t]));return btoa(n.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var t,n=atob(r),e=new Uint8Array(n.length);for(t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return e},r.randomBytes=function(r){var t=new Uint8Array(r);return rr(t,r),t},r.secretbox=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(dr+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+dr]=r[i];return p(o,e,e.length,t,n),o.subarray(Ar)},r.secretbox.open=function(r,t,n){Q(r,t,n),H(n,t);for(var e=new Uint8Array(Ar+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+Ar]=r[i];return e.length<32?!1:0!==g(o,e,e.length,t,n)?!1:o.subarray(dr)},r.secretbox.keyLength=vr,r.secretbox.nonceLength=br,r.secretbox.overheadLength=Ar,r.scalarMult=function(r,t){if(Q(r,t),r.length!==Ur)throw new Error("bad n size");if(t.length!==_r)throw new Error("bad p size");var n=new Uint8Array(_r);return T(n,r,t),n},r.scalarMult.base=function(r){if(Q(r),r.length!==Ur)throw new Error("bad n size");var t=new Uint8Array(_r);return Y(t,r),t},r.scalarMult.scalarLength=Ur,r.scalarMult.groupElementLength=_r,r.box=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox(t,n,i)},r.box.before=function(r,t){Q(r,t),J(r,t);var n=new Uint8Array(Mr);return L(n,r,t),n},r.box.after=r.secretbox,r.box.open=function(t,n,e,o){var i=r.box.before(e,o);return r.secretbox.open(t,n,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Er),t=new Uint8Array(xr);return k(r,t),{publicKey:r,secretKey:t}},r.box.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==xr)throw new Error("bad secret key size");var t=new Uint8Array(Er);return Y(t,r),{publicKey:t,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Er,r.box.secretKeyLength=xr,r.box.sharedKeyLength=Mr,r.box.nonceLength=mr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,t){if(Q(r,t),t.length!==Yr)throw new Error("bad secret key size");var n=new Uint8Array(Kr+r.length);return q(n,r,r.length,t),n},r.sign.open=function(r,t){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(Q(r,t),t.length!==Tr)throw new Error("bad public key size");var n=new Uint8Array(r.length),e=D(n,r,r.length,t);if(0>e)return null;for(var o=new Uint8Array(e),i=0;i<o.length;i++)o[i]=n[i];return o},r.sign.detached=function(t,n){for(var e=r.sign(t,n),o=new Uint8Array(Kr),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached.verify=function(r,t,n){if(Q(r,t,n),t.length!==Kr)throw new Error("bad signature size");if(n.length!==Tr)throw new Error("bad public key size");var e,o=new Uint8Array(Kr+r.length),i=new Uint8Array(Kr+r.length);for(e=0;Kr>e;e++)o[e]=t[e];for(e=0;e<r.length;e++)o[e+Kr]=r[e];return D(i,o,o.length,n)>=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return G(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;n<t.length;n++)t[n]=r[32+n];return{publicKey:t,secretKey:new Uint8Array(r)
+}},r.sign.keyPair.fromSeed=function(r){if(Q(r),r.length!==kr)throw new Error("bad seed size");for(var t=new Uint8Array(Tr),n=new Uint8Array(Yr),e=0;32>e;e++)n[e]=r[e];return G(t,n,!0),{publicKey:t,secretKey:n}},r.sign.publicKeyLength=Tr,r.sign.secretKeyLength=Yr,r.sign.seedLength=kr,r.sign.signatureLength=Kr,r.hash=function(r){Q(r);var t=new Uint8Array(Lr);return P(t,r,r.length),t},r.hash.hashLength=Lr,r.verify=function(r,t){return Q(r,t),0===r.length||0===t.length?!1:r.length!==t.length?!1:0===n(r,0,t,0,r.length)?!0:!1},r.setPRNG=function(r){rr=r},function(){var t;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?t=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(t=window.msCrypto),t&&r.setPRNG(function(r,n){var e,o=new Uint8Array(n);for(t.getRandomValues(o),e=0;n>e;e++)r[e]=o[e];W(o)})):"undefined"!=typeof require&&(t=require("crypto"),t&&r.setPRNG(function(r,n){var e,o=t.randomBytes(n);for(e=0;n>e;e++)r[e]=o[e];W(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js
index f72dd78d12..b8edbbee69 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.js
@@ -944,13 +944,39 @@ function cleanup(arr) {
for (var i = 0; i < arr.length; i++) arr[i] = 0;
}
-// TODO: Completely remove this in v0.15.
-if (!nacl.util) {
- nacl.util = {};
- nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() {
- throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js');
- };
-}
+nacl.util = {};
+
+nacl.util.decodeUTF8 = function(s) {
+ var i, d = unescape(encodeURIComponent(s)), b = new Uint8Array(d.length);
+ for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
+ return b;
+};
+
+nacl.util.encodeUTF8 = function(arr) {
+ var i, s = [];
+ for (i = 0; i < arr.length; i++) s.push(String.fromCharCode(arr[i]));
+ return decodeURIComponent(escape(s.join('')));
+};
+
+nacl.util.encodeBase64 = function(arr) {
+ if (typeof btoa === 'undefined') {
+ return (new Buffer(arr)).toString('base64');
+ } else {
+ var i, s = [], len = arr.length;
+ for (i = 0; i < len; i++) s.push(String.fromCharCode(arr[i]));
+ return btoa(s.join(''));
+ }
+};
+
+nacl.util.decodeBase64 = function(s) {
+ if (typeof atob === 'undefined') {
+ return new Uint8Array(Array.prototype.slice.call(new Buffer(s, 'base64'), 0));
+ } else {
+ var i, d = atob(s), b = new Uint8Array(d.length);
+ for (i = 0; i < d.length; i++) b[i] = d.charCodeAt(i);
+ return b;
+ }
+};
nacl.randomBytes = function(n) {
var b = new Uint8Array(n);
@@ -1147,22 +1173,26 @@ nacl.setPRNG = function(fn) {
(function() {
// Initialize PRNG if environment provides CSPRNG.
// If not, methods calling randombytes will throw.
- var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null;
- if (crypto && crypto.getRandomValues) {
- // Browsers.
- var QUOTA = 65536;
- nacl.setPRNG(function(x, n) {
- var i, v = new Uint8Array(n);
- for (i = 0; i < n; i += QUOTA) {
- crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA)));
- }
- for (i = 0; i < n; i++) x[i] = v[i];
- cleanup(v);
- });
+ var crypto;
+ if (typeof window !== 'undefined') {
+ // Browser.
+ if (window.crypto && window.crypto.getRandomValues) {
+ crypto = window.crypto; // Standard
+ } else if (window.msCrypto && window.msCrypto.getRandomValues) {
+ crypto = window.msCrypto; // Internet Explorer 11+
+ }
+ if (crypto) {
+ nacl.setPRNG(function(x, n) {
+ var i, v = new Uint8Array(n);
+ crypto.getRandomValues(v);
+ for (i = 0; i < n; i++) x[i] = v[i];
+ cleanup(v);
+ });
+ }
} else if (typeof require !== 'undefined') {
// Node.js.
crypto = require('crypto');
- if (crypto && crypto.randomBytes) {
+ if (crypto) {
nacl.setPRNG(function(x, n) {
var i, v = crypto.randomBytes(n);
for (i = 0; i < n; i++) x[i] = v[i];
@@ -1172,4 +1202,4 @@ nacl.setPRNG = function(fn) {
}
})();
-})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {}));
+})(typeof module !== 'undefined' && module.exports ? module.exports : (window.nacl = window.nacl || {}));
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js
index eed3854153..95d869502e 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/nacl.min.js
@@ -1 +1 @@
-!function(r){"use strict";function n(r,n){return r<<n|r>>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new lr(e,t)}function o(r,n,e){var t;for(t=0;4>t;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;o>i;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),s=new Uint32Array(16),l=new Uint32Array(16),h=new Uint32Array(4);for(u=0;4>u;u++)s[5*u]=e(a,4*u),s[1+u]=e(i,4*u),s[6+u]=e(t,4*u),s[11+u]=e(i,16+4*u);for(u=0;16>u;u++)l[u]=s[u];for(u=0;20>u;u++){for(c=0;4>c;c++){for(w=0;4>w;w++)h[w]=s[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;4>w;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;16>w;w++)s[w]=y[w]}if(f){for(u=0;16>u;u++)s[u]=s[u]+l[u]|0;for(u=0;4>u;u++)s[5*u]=s[5*u]-e(a,4*u)|0,s[6+u]=s[6+u]-e(t,4*u)|0;for(u=0;4>u;u++)o(r,4*u,s[5*u]),o(r,16+4*u,s[6+u])}else for(u=0;16>u;u++)o(r,4*u,s[u]+l[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function s(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;16>u;u++)c[u]=0;for(u=0;8>u;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;64>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;16>u;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;o>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function l(r,n,e,t,o){return s(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),l(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),s(r,n,e,t,o,i.subarray(16),f)}function v(r,n){var e,t=0;for(e=0;17>e;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function b(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),s=new Uint32Array(17),l=new Uint32Array(17),h=new Uint32Array(17);for(u=0;17>u;u++)y[u]=s[u]=0;for(u=0;16>u;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;17>u;u++)l[u]=0;for(u=0;16>u&&o>u;++u)l[u]=e[t+u];for(l[u]=1,t+=u,o-=u,v(s,l),f=0;17>f;f++)for(w[f]=0,u=0;17>u;u++)w[f]=w[f]+s[u]*(f>=u?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;17>f;f++)s[f]=w[f];for(c=0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;for(c=c+s[16]|0,s[16]=3&c,c=5*(c>>>2)|0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;c=c+s[16]|0,s[16]=c}for(u=0;17>u;u++)h[u]=s[u];for(v(s,Sr),a=0|-(s[16]>>>7),u=0;17>u;u++)s[u]^=a&(h[u]^s[u]);for(u=0;16>u;u++)l[u]=i[u+16];for(l[16]=0,v(s,l),u=0;16>u;u++)r[n+u]=s[u];return 0}function p(r,n,e,t,o,i){var a=new Uint8Array(16);return b(a,0,e,t,o,i),f(r,n,a,0)}function _(r,n,e,t,o){var i;if(32>e)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;16>i;i++)r[i]=0;return 0}function A(r,n,e,t,o){var i,a=new Uint8Array(32);if(32>e)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;32>i;i++)r[i]=0;return 0}function U(r,n){var e;for(e=0;16>e;e++)r[e]=0|n[e]}function E(r){var n,e;for(e=0;16>e;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(15>e?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function d(r,n,e){for(var t,o=~(e-1),i=0;16>i;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;16>e;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;2>t;t++){for(i[0]=a[0]-65517,e=1;15>e;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;16>e;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;16>e;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;31>t;t++)i[t]=0;for(t=0;16>t;t++)for(o=0;16>o;o++)i[t+o]+=n[t]*e[o];for(t=0;15>t;t++)i[t]+=38*i[t+16];for(t=0;16>t;t++)r[t]=i[t];E(r),E(r)}function L(r,n){Y(r,n,n)}function k(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function z(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function R(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),s=hr();for(o=0;31>o;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;16>o;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(s,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,s),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,s),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;16>o;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var l=a.subarray(32),h=a.subarray(16);return k(l,l),Y(h,h,l),x(r,h),0}function P(r,n){return R(r,n,br)}function O(r,n){return gr(n,32),P(r,n)}function F(r,n,e){var t=new Uint8Array(32);return R(t,e,n),y(r,vr,t,Br)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Kr(r,n,e,t,a)}function C(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e<arguments.length;e++)r=arguments[e].lo,n=arguments[e].hi,t+=r&f,o+=r>>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new lr(i&f|a<<16,t&f|o<<16)}function G(r,n){return new lr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function Z(){var r,n=0,e=0;for(r=0;r<arguments.length;r++)n^=arguments[r].lo,e^=arguments[r].hi;return new lr(e,n)}function j(r,n){var e,t,o=32-n;return 32>n?(e=r.hi>>>n|r.lo<<o,t=r.lo>>>n|r.hi<<o):64>n&&(e=r.lo>>>n|r.hi<<o,t=r.hi>>>n|r.lo<<o),new lr(e,t)}function q(r,n,e){var t=r.hi&n.hi^~r.hi&e.hi,o=r.lo&n.lo^~r.lo&e.lo;return new lr(t,o)}function I(r,n,e){var t=r.hi&n.hi^r.hi&e.hi^n.hi&e.hi,o=r.lo&n.lo^r.lo&e.lo^n.lo&e.lo;return new lr(t,o)}function V(r){return Z(j(r,28),j(r,34),j(r,39))}function X(r){return Z(j(r,14),j(r,18),j(r,41))}function D(r){return Z(j(r,1),j(r,8),G(r,7))}function H(r){return Z(j(r,19),j(r,61),G(r,6))}function J(r,n,e){var o,a,f,u=[],c=[],w=[],y=[];for(a=0;8>a;a++)u[a]=w[a]=t(r,8*a);for(var s=0;e>=128;){for(a=0;16>a;a++)y[a]=t(n,8*a+s);for(a=0;80>a;a++){for(f=0;8>f;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;8>f;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;16>f;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;8>a;a++)w[a]=M(w[a],u[a]),u[a]=w[a];s+=128,e-=128}for(a=0;8>a;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;64>t;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;256>t;t++)a[t]=0;for(t=0;e>t;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,i(a,e-8,new lr(f/536870912|0,f<<3)),J(o,a,e),t=0;64>t;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,Er),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;4>t;t++)d(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();k(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(U(r[0],pr),U(r[1],_r),U(r[2],_r),U(r[3],pr),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;32>t;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;i>o;++o)n[o]+=e-16*n[t]*kr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;32>o;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;32>o;o++)n[o]-=e*kr[o];for(t=0;32>t;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;64>n;n++)e[n]=r[n];for(n=0;64>n;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;e>o;o++)r[64+o]=n[o];for(o=0;32>o;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;64>o;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;64>o;o++)c[o]=0;for(o=0;32>o;o++)c[o]=u[o];for(o=0;32>o;o++)for(i=0;32>i;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return U(r[2],_r),S(r[1],n),L(o,r[1]),Y(i,o,Ur),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),z(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,64>e)return-1;if(fr(w,t))return-1;for(o=0;e>o;o++)r[o]=n[o];for(o=0;32>o;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;e>o;o++)r[o]=0;return-1}for(o=0;e>o;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==zr)throw new Error("bad key size");if(n.length!==Rr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Cr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;n<arguments.length;n++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[n])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function sr(r){for(var n=0;n<r.length;n++)r[n]=0}var lr=function(r,n){this.hi=0|r,this.lo=0|n},hr=function(r){var n,e=new Float64Array(16);if(r)for(n=0;n<r.length;n++)e[n]=r[n];return e},gr=function(){throw new Error("no PRNG")},vr=new Uint8Array(16),br=new Uint8Array(32);br[0]=9;var pr=hr(),_r=hr([1]),Ar=hr([56129,1]),Ur=hr([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Er=hr([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),dr=hr([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),xr=hr([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),mr=hr([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),Br=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),Sr=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]),Kr=_,Tr=A,Yr=[new lr(1116352408,3609767458),new lr(1899447441,602891725),new lr(3049323471,3964484399),new lr(3921009573,2173295548),new lr(961987163,4081628472),new lr(1508970993,3053834265),new lr(2453635748,2937671579),new lr(2870763221,3664609560),new lr(3624381080,2734883394),new lr(310598401,1164996542),new lr(607225278,1323610764),new lr(1426881987,3590304994),new lr(1925078388,4068182383),new lr(2162078206,991336113),new lr(2614888103,633803317),new lr(3248222580,3479774868),new lr(3835390401,2666613458),new lr(4022224774,944711139),new lr(264347078,2341262773),new lr(604807628,2007800933),new lr(770255983,1495990901),new lr(1249150122,1856431235),new lr(1555081692,3175218132),new lr(1996064986,2198950837),new lr(2554220882,3999719339),new lr(2821834349,766784016),new lr(2952996808,2566594879),new lr(3210313671,3203337956),new lr(3336571891,1034457026),new lr(3584528711,2466948901),new lr(113926993,3758326383),new lr(338241895,168717936),new lr(666307205,1188179964),new lr(773529912,1546045734),new lr(1294757372,1522805485),new lr(1396182291,2643833823),new lr(1695183700,2343527390),new lr(1986661051,1014477480),new lr(2177026350,1206759142),new lr(2456956037,344077627),new lr(2730485921,1290863460),new lr(2820302411,3158454273),new lr(3259730800,3505952657),new lr(3345764771,106217008),new lr(3516065817,3606008344),new lr(3600352804,1432725776),new lr(4094571909,1467031594),new lr(275423344,851169720),new lr(430227734,3100823752),new lr(506948616,1363258195),new lr(659060556,3750685593),new lr(883997877,3785050280),new lr(958139571,3318307427),new lr(1322822218,3812723403),new lr(1537002063,2003034995),new lr(1747873779,3602036899),new lr(1955562222,1575990012),new lr(2024104815,1125592928),new lr(2227730452,2716904306),new lr(2361852424,442776044),new lr(2428436474,593698344),new lr(2756734187,3733110249),new lr(3204031479,2999351573),new lr(3329325298,3815920427),new lr(3391569614,3928383900),new lr(3515267271,566280711),new lr(3940187606,3454069534),new lr(4118630271,4000239992),new lr(116418474,1914138554),new lr(174292421,2731055270),new lr(289380356,3203993006),new lr(460393269,320620315),new lr(685471733,587496836),new lr(852142971,1086792851),new lr(1017036298,365543100),new lr(1126000580,2618297676),new lr(1288033470,3409855158),new lr(1501505948,4234509866),new lr(1607167915,987167468),new lr(1816402316,1246189591)],Lr=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]),kr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),zr=32,Rr=24,Pr=32,Or=16,Fr=32,Nr=32,Cr=32,Mr=32,Gr=32,Zr=Rr,jr=Pr,qr=Or,Ir=64,Vr=32,Xr=64,Dr=32,Hr=64;r.lowlevel={crypto_core_hsalsa20:y,crypto_stream_xor:g,crypto_stream:h,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:l,crypto_onetimeauth:b,crypto_onetimeauth_verify:p,crypto_verify_16:f,crypto_verify_32:u,crypto_secretbox:_,crypto_secretbox_open:A,crypto_scalarmult:R,crypto_scalarmult_base:P,crypto_box_beforenm:F,crypto_box_afternm:Kr,crypto_box:N,crypto_box_open:C,crypto_box_keypair:O,crypto_hash:Q,crypto_sign:ar,crypto_sign_keypair:tr,crypto_sign_open:ur,crypto_secretbox_KEYBYTES:zr,crypto_secretbox_NONCEBYTES:Rr,crypto_secretbox_ZEROBYTES:Pr,crypto_secretbox_BOXZEROBYTES:Or,crypto_scalarmult_BYTES:Fr,crypto_scalarmult_SCALARBYTES:Nr,crypto_box_PUBLICKEYBYTES:Cr,crypto_box_SECRETKEYBYTES:Mr,crypto_box_BEFORENMBYTES:Gr,crypto_box_NONCEBYTES:Zr,crypto_box_ZEROBYTES:jr,crypto_box_BOXZEROBYTES:qr,crypto_sign_BYTES:Ir,crypto_sign_PUBLICKEYBYTES:Vr,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:Dr,crypto_hash_BYTES:Hr},r.util||(r.util={},r.util.decodeUTF8=r.util.encodeUTF8=r.util.encodeBase64=r.util.decodeBase64=function(){throw new Error("nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js")}),r.randomBytes=function(r){var n=new Uint8Array(r);return gr(n,r),n},r.secretbox=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Pr+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Pr]=r[i];return _(o,t,t.length,n,e),o.subarray(Or)},r.secretbox.open=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Or+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Or]=r[i];return t.length<32?!1:0!==A(o,t,t.length,n,e)?!1:o.subarray(Pr)},r.secretbox.keyLength=zr,r.secretbox.nonceLength=Rr,r.secretbox.overheadLength=Or,r.scalarMult=function(r,n){if(yr(r,n),r.length!==Nr)throw new Error("bad n size");if(n.length!==Fr)throw new Error("bad p size");var e=new Uint8Array(Fr);return R(e,r,n),e},r.scalarMult.base=function(r){if(yr(r),r.length!==Nr)throw new Error("bad n size");var n=new Uint8Array(Fr);return P(n,r),n},r.scalarMult.scalarLength=Nr,r.scalarMult.groupElementLength=Fr,r.box=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox(n,e,i)},r.box.before=function(r,n){yr(r,n),wr(r,n);var e=new Uint8Array(Gr);return F(e,r,n),e},r.box.after=r.secretbox,r.box.open=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox.open(n,e,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Cr),n=new Uint8Array(Mr);return O(r,n),{publicKey:r,secretKey:n}},r.box.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Mr)throw new Error("bad secret key size");var n=new Uint8Array(Cr);return P(n,r),{publicKey:n,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Cr,r.box.secretKeyLength=Mr,r.box.sharedKeyLength=Gr,r.box.nonceLength=Zr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,n){if(yr(r,n),n.length!==Xr)throw new Error("bad secret key size");var e=new Uint8Array(Ir+r.length);return ar(e,r,r.length,n),e},r.sign.open=function(r,n){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(yr(r,n),n.length!==Vr)throw new Error("bad public key size");var e=new Uint8Array(r.length),t=ur(e,r,r.length,n);if(0>t)return null;for(var o=new Uint8Array(t),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached=function(n,e){for(var t=r.sign(n,e),o=new Uint8Array(Ir),i=0;i<o.length;i++)o[i]=t[i];return o},r.sign.detached.verify=function(r,n,e){if(yr(r,n,e),n.length!==Ir)throw new Error("bad signature size");if(e.length!==Vr)throw new Error("bad public key size");var t,o=new Uint8Array(Ir+r.length),i=new Uint8Array(Ir+r.length);for(t=0;Ir>t;t++)o[t]=n[t];for(t=0;t<r.length;t++)o[t+Ir]=r[t];return ur(i,o,o.length,e)>=0},r.sign.keyPair=function(){var r=new Uint8Array(Vr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(Vr),e=0;e<n.length;e++)n[e]=r[32+e];return{publicKey:n,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(yr(r),r.length!==Dr)throw new Error("bad seed size");for(var n=new Uint8Array(Vr),e=new Uint8Array(Xr),t=0;32>t;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=Vr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Ir,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0===r.length||0===n.length?!1:r.length!==n.length?!1:0===a(r,0,n,0,r.length)?!0:!1},r.setPRNG=function(r){gr=r},function(){var n="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(n&&n.getRandomValues){var e=65536;r.setPRNG(function(r,t){var o,i=new Uint8Array(t);for(o=0;t>o;o+=e)n.getRandomValues(i.subarray(o,o+Math.min(t-o,e)));for(o=0;t>o;o++)r[o]=i[o];sr(i)})}else"undefined"!=typeof require&&(n=require("crypto"),n&&n.randomBytes&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;e>t;t++)r[t]=o[t];sr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{}); \ No newline at end of file
+!function(r){"use strict";function n(r,n){return r<<n|r>>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new lr(e,t)}function o(r,n,e){var t;for(t=0;4>t;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;o>i;i++)a|=r[n+i]^e[t+i];return(1&a-1>>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),s=new Uint32Array(16),l=new Uint32Array(16),h=new Uint32Array(4);for(u=0;4>u;u++)s[5*u]=e(a,4*u),s[1+u]=e(i,4*u),s[6+u]=e(t,4*u),s[11+u]=e(i,16+4*u);for(u=0;16>u;u++)l[u]=s[u];for(u=0;20>u;u++){for(c=0;4>c;c++){for(w=0;4>w;w++)h[w]=s[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;4>w;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;16>w;w++)s[w]=y[w]}if(f){for(u=0;16>u;u++)s[u]=s[u]+l[u]|0;for(u=0;4>u;u++)s[5*u]=s[5*u]-e(a,4*u)|0,s[6+u]=s[6+u]-e(t,4*u)|0;for(u=0;4>u;u++)o(r,4*u,s[5*u]),o(r,16+4*u,s[6+u])}else for(u=0;16>u;u++)o(r,4*u,s[u]+l[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function s(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;16>u;u++)c[u]=0;for(u=0;8>u;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;64>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;16>u;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;o>u;u++)r[n+u]=(e?e[t+u]:0)^y[u];return 0}function l(r,n,e,t,o){return s(r,n,null,0,e,t,o)}function h(r,n,e,t,o){var i=new Uint8Array(32);return y(i,t,o,Br),l(r,n,e,t.subarray(16),i)}function g(r,n,e,t,o,i,a){var f=new Uint8Array(32);return y(f,i,a,Br),s(r,n,e,t,o,i.subarray(16),f)}function p(r,n){var e,t=0;for(e=0;17>e;e++)t=t+(r[e]+n[e]|0)|0,r[e]=255&t,t>>>=8}function v(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),s=new Uint32Array(17),l=new Uint32Array(17),h=new Uint32Array(17);for(u=0;17>u;u++)y[u]=s[u]=0;for(u=0;16>u;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;17>u;u++)l[u]=0;for(u=0;16>u&&o>u;++u)l[u]=e[t+u];for(l[u]=1,t+=u,o-=u,p(s,l),f=0;17>f;f++)for(w[f]=0,u=0;17>u;u++)w[f]=w[f]+s[u]*(f>=u?y[f-u]:320*y[f+17-u]|0)|0|0;for(f=0;17>f;f++)s[f]=w[f];for(c=0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;for(c=c+s[16]|0,s[16]=3&c,c=5*(c>>>2)|0,u=0;16>u;u++)c=c+s[u]|0,s[u]=255&c,c>>>=8;c=c+s[16]|0,s[16]=c}for(u=0;17>u;u++)h[u]=s[u];for(p(s,Sr),a=0|-(s[16]>>>7),u=0;17>u;u++)s[u]^=a&(h[u]^s[u]);for(u=0;16>u;u++)l[u]=i[u+16];for(l[16]=0,p(s,l),u=0;16>u;u++)r[n+u]=s[u];return 0}function b(r,n,e,t,o,i){var a=new Uint8Array(16);return v(a,0,e,t,o,i),f(r,n,a,0)}function A(r,n,e,t,o){var i;if(32>e)return-1;for(g(r,0,n,0,e,t,o),v(r,16,r,32,e-32,r),i=0;16>i;i++)r[i]=0;return 0}function U(r,n,e,t,o){var i,a=new Uint8Array(32);if(32>e)return-1;if(h(a,0,32,t,o),0!==b(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;32>i;i++)r[i]=0;return 0}function _(r,n){var e;for(e=0;16>e;e++)r[e]=0|n[e]}function d(r){var n,e;for(e=0;16>e;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(15>e?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function E(r,n,e){for(var t,o=~(e-1),i=0;16>i;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;16>e;e++)a[e]=n[e];for(d(a),d(a),d(a),t=0;2>t;t++){for(i[0]=a[0]-65517,e=1;15>e;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,E(a,i,1-o)}for(e=0;16>e;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;16>e;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;16>t;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;31>t;t++)i[t]=0;for(t=0;16>t;t++)for(o=0;16>o;o++)i[t+o]+=n[t]*e[o];for(t=0;15>t;t++)i[t]+=38*i[t+16];for(t=0;16>t;t++)r[t]=i[t];d(r),d(r)}function L(r,n){Y(r,n,n)}function C(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function R(r,n){var e,t=hr();for(e=0;16>e;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;16>e;e++)r[e]=t[e]}function k(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),s=hr();for(o=0;31>o;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;16>o;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,E(f,u,t),E(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(s,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,s),Y(f,c,Ur),K(f,f,w),Y(c,c,f),Y(f,w,s),Y(w,u,a),L(u,y),E(f,u,t),E(c,w,t);for(o=0;16>o;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var l=a.subarray(32),h=a.subarray(16);return C(l,l),Y(h,h,l),x(r,h),0}function z(r,n){return k(r,n,vr)}function P(r,n){return gr(n,32),z(r,n)}function O(r,n,e){var t=new Uint8Array(32);return k(t,e,n),y(r,pr,t,Br)}function F(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Kr(r,n,e,t,a)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return O(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e<arguments.length;e++)r=arguments[e].lo,n=arguments[e].hi,t+=r&f,o+=r>>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new lr(i&f|a<<16,t&f|o<<16)}function j(r,n){return new lr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function G(){var r,n=0,e=0;for(r=0;r<arguments.length;r++)n^=arguments[r].lo,e^=arguments[r].hi;return new lr(e,n)}function I(r,n){var e,t,o=32-n;return 32>n?(e=r.hi>>>n|r.lo<<o,t=r.lo>>>n|r.hi<<o):64>n&&(e=r.lo>>>n|r.hi<<o,t=r.hi>>>n|r.lo<<o),new lr(e,t)}function Z(r,n,e){var t=r.hi&n.hi^~r.hi&e.hi,o=r.lo&n.lo^~r.lo&e.lo;return new lr(t,o)}function V(r,n,e){var t=r.hi&n.hi^r.hi&e.hi^n.hi&e.hi,o=r.lo&n.lo^r.lo&e.lo^n.lo&e.lo;return new lr(t,o)}function q(r){return G(I(r,28),I(r,34),I(r,39))}function X(r){return G(I(r,14),I(r,18),I(r,41))}function D(r){return G(I(r,1),I(r,8),j(r,7))}function H(r){return G(I(r,19),I(r,61),j(r,6))}function J(r,n,e){var o,a,f,u=[],c=[],w=[],y=[];for(a=0;8>a;a++)u[a]=w[a]=t(r,8*a);for(var s=0;e>=128;){for(a=0;16>a;a++)y[a]=t(n,8*a+s);for(a=0;80>a;a++){for(f=0;8>f;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),Z(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,q(w[0]),V(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;8>f;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;16>f;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;8>a;a++)w[a]=M(w[a],u[a]),u[a]=w[a];s+=128,e-=128}for(a=0;8>a;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;64>t;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;256>t;t++)a[t]=0;for(t=0;e>t;t++)a[t]=n[f-e+t];for(a[e]=128,e=256-128*(112>e?1:0),a[e-9]=0,i(a,e-8,new lr(f/536870912|0,f<<3)),J(o,a,e),t=0;64>t;t++)r[t]=o[t];return 0}function W(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr(),c=hr(),w=hr();T(e,r[1],r[0]),T(w,n[1],n[0]),Y(e,e,w),K(t,r[0],r[1]),K(w,n[0],n[1]),Y(t,t,w),Y(o,r[3],n[3]),Y(o,o,dr),Y(i,r[2],n[2]),K(i,i,i),T(a,t,e),T(f,i,o),K(u,i,o),K(c,t,e),Y(r[0],a,f),Y(r[1],c,u),Y(r[2],u,f),Y(r[3],a,c)}function $(r,n,e){var t;for(t=0;4>t;t++)E(r[t],n[t],e)}function rr(r,n){var e=hr(),t=hr(),o=hr();C(o,n[2]),Y(e,n[0],o),Y(t,n[1],o),x(r,t),r[31]^=B(e)<<7}function nr(r,n,e){var t,o;for(_(r[0],br),_(r[1],Ar),_(r[2],Ar),_(r[3],br),o=255;o>=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];_(e[0],Er),_(e[1],xr),_(e[2],Ar),Y(e[3],Er,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;32>t;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;i>o;++o)n[o]+=e-16*n[t]*Cr[o-(t-32)],e=n[o]+128>>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;32>o;o++)n[o]+=e-(n[31]>>4)*Cr[o],e=n[o]>>8,n[o]&=255;for(o=0;32>o;o++)n[o]-=e*Cr[o];for(t=0;32>t;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;64>n;n++)e[n]=r[n];for(n=0;64>n;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;e>o;o++)r[64+o]=n[o];for(o=0;32>o;o++)r[32+o]=a[32+o];for(Q(u,r.subarray(32),e+32),ir(u),er(w,u),rr(r,w),o=32;64>o;o++)r[o]=t[o];for(Q(f,r,e+64),ir(f),o=0;64>o;o++)c[o]=0;for(o=0;32>o;o++)c[o]=u[o];for(o=0;32>o;o++)for(i=0;32>i;i++)c[o+i]+=f[o]*a[i];return or(r.subarray(32),c),y}function fr(r,n){var e=hr(),t=hr(),o=hr(),i=hr(),a=hr(),f=hr(),u=hr();return _(r[2],Ar),S(r[1],n),L(o,r[1]),Y(i,o,_r),T(o,o,r[2]),K(i,r[2],i),L(a,i),L(f,a),Y(u,f,a),Y(e,u,o),Y(e,e,i),R(e,e),Y(e,e,o),Y(e,e,i),Y(e,e,i),Y(r[0],e,i),L(t,r[0]),Y(t,t,i),m(t,o)&&Y(r[0],r[0],mr),L(t,r[0]),Y(t,t,i),m(t,o)?-1:(B(r[0])===n[31]>>7&&T(r[0],br,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,64>e)return-1;if(fr(w,t))return-1;for(o=0;e>o;o++)r[o]=n[o];for(o=0;32>o;o++)r[o+32]=t[o];if(Q(f,r,e),ir(f),nr(c,w,f),er(w,n.subarray(32)),W(c,w),rr(a,c),e-=64,u(n,0,a,0)){for(o=0;e>o;o++)r[o]=0;return-1}for(o=0;e>o;o++)r[o]=n[o+64];return i=e}function cr(r,n){if(r.length!==Rr)throw new Error("bad key size");if(n.length!==kr)throw new Error("bad nonce size")}function wr(r,n){if(r.length!==Nr)throw new Error("bad public key size");if(n.length!==Mr)throw new Error("bad secret key size")}function yr(){var r,n;for(n=0;n<arguments.length;n++)if("[object Uint8Array]"!==(r=Object.prototype.toString.call(arguments[n])))throw new TypeError("unexpected type "+r+", use Uint8Array")}function sr(r){for(var n=0;n<r.length;n++)r[n]=0}var lr=function(r,n){this.hi=0|r,this.lo=0|n},hr=function(r){var n,e=new Float64Array(16);if(r)for(n=0;n<r.length;n++)e[n]=r[n];return e},gr=function(){throw new Error("no PRNG")},pr=new Uint8Array(16),vr=new Uint8Array(32);vr[0]=9;var br=hr(),Ar=hr([1]),Ur=hr([56129,1]),_r=hr([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),dr=hr([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),Er=hr([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),xr=hr([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),mr=hr([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),Br=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),Sr=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]),Kr=A,Tr=U,Yr=[new lr(1116352408,3609767458),new lr(1899447441,602891725),new lr(3049323471,3964484399),new lr(3921009573,2173295548),new lr(961987163,4081628472),new lr(1508970993,3053834265),new lr(2453635748,2937671579),new lr(2870763221,3664609560),new lr(3624381080,2734883394),new lr(310598401,1164996542),new lr(607225278,1323610764),new lr(1426881987,3590304994),new lr(1925078388,4068182383),new lr(2162078206,991336113),new lr(2614888103,633803317),new lr(3248222580,3479774868),new lr(3835390401,2666613458),new lr(4022224774,944711139),new lr(264347078,2341262773),new lr(604807628,2007800933),new lr(770255983,1495990901),new lr(1249150122,1856431235),new lr(1555081692,3175218132),new lr(1996064986,2198950837),new lr(2554220882,3999719339),new lr(2821834349,766784016),new lr(2952996808,2566594879),new lr(3210313671,3203337956),new lr(3336571891,1034457026),new lr(3584528711,2466948901),new lr(113926993,3758326383),new lr(338241895,168717936),new lr(666307205,1188179964),new lr(773529912,1546045734),new lr(1294757372,1522805485),new lr(1396182291,2643833823),new lr(1695183700,2343527390),new lr(1986661051,1014477480),new lr(2177026350,1206759142),new lr(2456956037,344077627),new lr(2730485921,1290863460),new lr(2820302411,3158454273),new lr(3259730800,3505952657),new lr(3345764771,106217008),new lr(3516065817,3606008344),new lr(3600352804,1432725776),new lr(4094571909,1467031594),new lr(275423344,851169720),new lr(430227734,3100823752),new lr(506948616,1363258195),new lr(659060556,3750685593),new lr(883997877,3785050280),new lr(958139571,3318307427),new lr(1322822218,3812723403),new lr(1537002063,2003034995),new lr(1747873779,3602036899),new lr(1955562222,1575990012),new lr(2024104815,1125592928),new lr(2227730452,2716904306),new lr(2361852424,442776044),new lr(2428436474,593698344),new lr(2756734187,3733110249),new lr(3204031479,2999351573),new lr(3329325298,3815920427),new lr(3391569614,3928383900),new lr(3515267271,566280711),new lr(3940187606,3454069534),new lr(4118630271,4000239992),new lr(116418474,1914138554),new lr(174292421,2731055270),new lr(289380356,3203993006),new lr(460393269,320620315),new lr(685471733,587496836),new lr(852142971,1086792851),new lr(1017036298,365543100),new lr(1126000580,2618297676),new lr(1288033470,3409855158),new lr(1501505948,4234509866),new lr(1607167915,987167468),new lr(1816402316,1246189591)],Lr=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]),Cr=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),Rr=32,kr=24,zr=32,Pr=16,Or=32,Fr=32,Nr=32,Mr=32,jr=32,Gr=kr,Ir=zr,Zr=Pr,Vr=64,qr=32,Xr=64,Dr=32,Hr=64;r.lowlevel={crypto_core_hsalsa20:y,crypto_stream_xor:g,crypto_stream:h,crypto_stream_salsa20_xor:s,crypto_stream_salsa20:l,crypto_onetimeauth:v,crypto_onetimeauth_verify:b,crypto_verify_16:f,crypto_verify_32:u,crypto_secretbox:A,crypto_secretbox_open:U,crypto_scalarmult:k,crypto_scalarmult_base:z,crypto_box_beforenm:O,crypto_box_afternm:Kr,crypto_box:F,crypto_box_open:N,crypto_box_keypair:P,crypto_hash:Q,crypto_sign:ar,crypto_sign_keypair:tr,crypto_sign_open:ur,crypto_secretbox_KEYBYTES:Rr,crypto_secretbox_NONCEBYTES:kr,crypto_secretbox_ZEROBYTES:zr,crypto_secretbox_BOXZEROBYTES:Pr,crypto_scalarmult_BYTES:Or,crypto_scalarmult_SCALARBYTES:Fr,crypto_box_PUBLICKEYBYTES:Nr,crypto_box_SECRETKEYBYTES:Mr,crypto_box_BEFORENMBYTES:jr,crypto_box_NONCEBYTES:Gr,crypto_box_ZEROBYTES:Ir,crypto_box_BOXZEROBYTES:Zr,crypto_sign_BYTES:Vr,crypto_sign_PUBLICKEYBYTES:qr,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:Dr,crypto_hash_BYTES:Hr},r.util={},r.util.decodeUTF8=function(r){var n,e=unescape(encodeURIComponent(r)),t=new Uint8Array(e.length);for(n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},r.util.encodeUTF8=function(r){var n,e=[];for(n=0;n<r.length;n++)e.push(String.fromCharCode(r[n]));return decodeURIComponent(escape(e.join("")))},r.util.encodeBase64=function(r){if("undefined"==typeof btoa)return new Buffer(r).toString("base64");var n,e=[],t=r.length;for(n=0;t>n;n++)e.push(String.fromCharCode(r[n]));return btoa(e.join(""))},r.util.decodeBase64=function(r){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0));var n,e=atob(r),t=new Uint8Array(e.length);for(n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t},r.randomBytes=function(r){var n=new Uint8Array(r);return gr(n,r),n},r.secretbox=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(zr+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+zr]=r[i];return A(o,t,t.length,n,e),o.subarray(Pr)},r.secretbox.open=function(r,n,e){yr(r,n,e),cr(e,n);for(var t=new Uint8Array(Pr+r.length),o=new Uint8Array(t.length),i=0;i<r.length;i++)t[i+Pr]=r[i];return t.length<32?!1:0!==U(o,t,t.length,n,e)?!1:o.subarray(zr)},r.secretbox.keyLength=Rr,r.secretbox.nonceLength=kr,r.secretbox.overheadLength=Pr,r.scalarMult=function(r,n){if(yr(r,n),r.length!==Fr)throw new Error("bad n size");if(n.length!==Or)throw new Error("bad p size");var e=new Uint8Array(Or);return k(e,r,n),e},r.scalarMult.base=function(r){if(yr(r),r.length!==Fr)throw new Error("bad n size");var n=new Uint8Array(Or);return z(n,r),n},r.scalarMult.scalarLength=Fr,r.scalarMult.groupElementLength=Or,r.box=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox(n,e,i)},r.box.before=function(r,n){yr(r,n),wr(r,n);var e=new Uint8Array(jr);return O(e,r,n),e},r.box.after=r.secretbox,r.box.open=function(n,e,t,o){var i=r.box.before(t,o);return r.secretbox.open(n,e,i)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var r=new Uint8Array(Nr),n=new Uint8Array(Mr);return P(r,n),{publicKey:r,secretKey:n}},r.box.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Mr)throw new Error("bad secret key size");var n=new Uint8Array(Nr);return z(n,r),{publicKey:n,secretKey:new Uint8Array(r)}},r.box.publicKeyLength=Nr,r.box.secretKeyLength=Mr,r.box.sharedKeyLength=jr,r.box.nonceLength=Gr,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(r,n){if(yr(r,n),n.length!==Xr)throw new Error("bad secret key size");var e=new Uint8Array(Vr+r.length);return ar(e,r,r.length,n),e},r.sign.open=function(r,n){if(2!==arguments.length)throw new Error("nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?");if(yr(r,n),n.length!==qr)throw new Error("bad public key size");var e=new Uint8Array(r.length),t=ur(e,r,r.length,n);if(0>t)return null;for(var o=new Uint8Array(t),i=0;i<o.length;i++)o[i]=e[i];return o},r.sign.detached=function(n,e){for(var t=r.sign(n,e),o=new Uint8Array(Vr),i=0;i<o.length;i++)o[i]=t[i];return o},r.sign.detached.verify=function(r,n,e){if(yr(r,n,e),n.length!==Vr)throw new Error("bad signature size");if(e.length!==qr)throw new Error("bad public key size");var t,o=new Uint8Array(Vr+r.length),i=new Uint8Array(Vr+r.length);for(t=0;Vr>t;t++)o[t]=n[t];for(t=0;t<r.length;t++)o[t+Vr]=r[t];return ur(i,o,o.length,e)>=0},r.sign.keyPair=function(){var r=new Uint8Array(qr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(qr),e=0;e<n.length;e++)n[e]=r[32+e];return{publicKey:n,secretKey:new Uint8Array(r)}},r.sign.keyPair.fromSeed=function(r){if(yr(r),r.length!==Dr)throw new Error("bad seed size");for(var n=new Uint8Array(qr),e=new Uint8Array(Xr),t=0;32>t;t++)e[t]=r[t];return tr(n,e,!0),{publicKey:n,secretKey:e}},r.sign.publicKeyLength=qr,r.sign.secretKeyLength=Xr,r.sign.seedLength=Dr,r.sign.signatureLength=Vr,r.hash=function(r){yr(r);var n=new Uint8Array(Hr);return Q(n,r,r.length),n},r.hash.hashLength=Hr,r.verify=function(r,n){return yr(r,n),0===r.length||0===n.length?!1:r.length!==n.length?!1:0===a(r,0,n,0,r.length)?!0:!1},r.setPRNG=function(r){gr=r},function(){var n;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?n=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(n=window.msCrypto),n&&r.setPRNG(function(r,e){var t,o=new Uint8Array(e);for(n.getRandomValues(o),t=0;e>t;t++)r[t]=o[t];sr(o)})):"undefined"!=typeof require&&(n=require("crypto"),n&&r.setPRNG(function(r,e){var t,o=n.randomBytes(e);for(t=0;e>t;t++)r[t]=o[t];sr(o)}))}()}("undefined"!=typeof module&&module.exports?module.exports:window.nacl=window.nacl||{}); \ No newline at end of file
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
index 0903b54ccf..147ea92c40 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/tweetnacl/package.json
@@ -1,41 +1,46 @@
{
"_args": [
[
- "tweetnacl@>=0.13.0 <1.0.0",
+ {
+ "raw": "tweetnacl@~0.13.0",
+ "scope": null,
+ "escapedName": "tweetnacl",
+ "name": "tweetnacl",
+ "rawSpec": "~0.13.0",
+ "spec": ">=0.13.0 <0.14.0",
+ "type": "range"
+ },
"/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk"
]
],
- "_from": "tweetnacl@>=0.13.0 <1.0.0",
- "_id": "tweetnacl@0.14.3",
+ "_from": "tweetnacl@>=0.13.0 <0.14.0",
+ "_id": "tweetnacl@0.13.3",
"_inCache": true,
"_installable": true,
"_location": "/request/http-signature/sshpk/tweetnacl",
- "_nodeVersion": "5.6.0",
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/tweetnacl-0.14.3.tgz_1459224951636_0.7403244483284652"
- },
+ "_nodeVersion": "4.2.3",
"_npmUser": {
- "email": "dmitry@codingrobots.com",
- "name": "dchest"
+ "name": "dchest",
+ "email": "dmitry@codingrobots.com"
},
- "_npmVersion": "3.7.3",
+ "_npmVersion": "2.14.7",
"_phantomChildren": {},
"_requested": {
- "name": "tweetnacl",
- "raw": "tweetnacl@>=0.13.0 <1.0.0",
- "rawSpec": ">=0.13.0 <1.0.0",
+ "raw": "tweetnacl@~0.13.0",
"scope": null,
- "spec": ">=0.13.0 <1.0.0",
+ "escapedName": "tweetnacl",
+ "name": "tweetnacl",
+ "rawSpec": "~0.13.0",
+ "spec": ">=0.13.0 <0.14.0",
"type": "range"
},
"_requiredBy": [
"/request/http-signature/sshpk"
],
- "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.3.tgz",
- "_shasum": "3da382f670f25ded78d7b3d1792119bca0b7132d",
+ "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz",
+ "_shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56",
"_shrinkwrap": null,
- "_spec": "tweetnacl@>=0.13.0 <1.0.0",
+ "_spec": "tweetnacl@~0.13.0",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk",
"author": {
"name": "TweetNaCl-js contributors"
@@ -50,24 +55,23 @@
"dependencies": {},
"description": "Port of TweetNaCl cryptographic library to JavaScript",
"devDependencies": {
- "browserify": "^13.0.0",
- "eslint": "^2.2.0",
- "faucet": "^0.0.1",
+ "browserify": "^10.1.3",
+ "eslint": "^1.4.3",
+ "faucet": "0.0.1",
"tap-browser-color": "^0.1.2",
- "tape": "^4.4.0",
- "tape-run": "^2.1.3",
- "tweetnacl-util": "^0.13.3",
- "uglify-js": "^2.6.1"
+ "tape": "^4.0.0",
+ "testling": "^1.7.1",
+ "uglify-js": "^2.4.21"
},
"directories": {
"test": "test"
},
"dist": {
- "shasum": "3da382f670f25ded78d7b3d1792119bca0b7132d",
- "tarball": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.3.tgz"
+ "shasum": "d628b56f3bcc3d5ae74ba9d4c1a704def5ab4b56",
+ "tarball": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.13.3.tgz"
},
- "gitHead": "3eb4fc544a2a1d6c0a41b98b9906288ca8b087e4",
- "homepage": "https://tweetnacl.js.org",
+ "gitHead": "2bb422cb707fba4a5ec9654688564a4fb861b068",
+ "homepage": "https://dchest.github.io/tweetnacl-js",
"keywords": [
"crypto",
"cryptography",
@@ -82,12 +86,12 @@
"salsa20",
"signatures"
],
- "license": "SEE LICENSE IN COPYING.txt",
+ "license": "Public domain",
"main": "nacl-fast.js",
"maintainers": [
{
- "email": "dmitry@codingrobots.com",
- "name": "dchest"
+ "name": "dchest",
+ "email": "dmitry@codingrobots.com"
}
],
"name": "tweetnacl",
@@ -99,13 +103,27 @@
},
"scripts": {
"bench": "node test/benchmark/bench.js",
+ "browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null",
+ "browser-quick": "browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null",
"build": "uglifyjs nacl.js -c -m -o nacl.min.js && uglifyjs nacl-fast.js -c -m -o nacl-fast.min.js",
- "build-test-browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null && browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null",
+ "chrome": "browserify test/browser/testling_init.js test/*.js | testling -x google-chrome | faucet",
+ "firefox": "browserify test/browser/testling_init.js test/*.js | testling -x firefox | faucet",
"lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js",
- "test": "npm run test-node-all && npm run test-browser",
- "test-browser": "NACL_SRC=${NACL_SRC:='nacl.min.js'} && npm run build-test-browser && cat $NACL_SRC test/browser/_bundle.js | tape-run | faucet",
- "test-node": "tape test/*.js | faucet",
- "test-node-all": "make -C test/c && tape test/*.js test/c/*.js | faucet"
+ "test": "tape test/*.js | faucet",
+ "testall": "make -C test/c && tape test/*.js test/c/*.js | faucet",
+ "testling": "browserify test/browser/testling_init.js test/*.js | testling | faucet"
+ },
+ "testling": {
+ "files": "test/*.js",
+ "browsers": [
+ "chrome/22..latest",
+ "firefox/16..latest",
+ "safari/latest",
+ "opera/11.0..latest",
+ "iphone/6..latest",
+ "ipad/6..latest",
+ "android-browser/latest"
+ ]
},
- "version": "0.14.3"
+ "version": "0.13.3"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
index fc995b42cd..27d297637e 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/package.json
@@ -1,39 +1,48 @@
{
"_args": [
[
- "sshpk@^1.7.0",
+ {
+ "raw": "sshpk@^1.7.0",
+ "scope": null,
+ "escapedName": "sshpk",
+ "name": "sshpk",
+ "rawSpec": "^1.7.0",
+ "spec": ">=1.7.0 <2.0.0",
+ "type": "range"
+ },
"/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature"
]
],
"_from": "sshpk@>=1.7.0 <2.0.0",
- "_id": "sshpk@1.7.4",
+ "_id": "sshpk@1.9.2",
"_inCache": true,
"_installable": true,
"_location": "/request/http-signature/sshpk",
- "_nodeVersion": "0.12.9",
+ "_nodeVersion": "0.12.15",
"_npmOperationalInternal": {
- "host": "packages-6-west.internal.npmjs.com",
- "tmp": "tmp/sshpk-1.7.4.tgz_1455236064846_0.4782760036177933"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/sshpk-1.9.2.tgz_1469841656006_0.10793639998883009"
},
"_npmUser": {
- "email": "alex@cooperi.net",
- "name": "arekinath"
+ "name": "arekinath",
+ "email": "alex@cooperi.net"
},
- "_npmVersion": "2.14.4",
+ "_npmVersion": "2.15.8",
"_phantomChildren": {},
"_requested": {
- "name": "sshpk",
"raw": "sshpk@^1.7.0",
- "rawSpec": "^1.7.0",
"scope": null,
+ "escapedName": "sshpk",
+ "name": "sshpk",
+ "rawSpec": "^1.7.0",
"spec": ">=1.7.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/request/http-signature"
],
- "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.7.4.tgz",
- "_shasum": "ad7b47defca61c8415d964243b62b0ce60fbca38",
+ "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.9.2.tgz",
+ "_shasum": "3b41351bbad5c34ddf4bd8119937efee31a46765",
"_shrinkwrap": null,
"_spec": "sshpk@^1.7.0",
"_where": "/Users/rebecca/code/npm/node_modules/request/node_modules/http-signature",
@@ -50,33 +59,34 @@
},
"contributors": [
{
- "email": "dave@daveeddy.com",
- "name": "Dave Eddy"
+ "name": "Dave Eddy",
+ "email": "dave@daveeddy.com"
},
{
- "email": "mcavage@gmail.com",
- "name": "Mark Cavage"
+ "name": "Mark Cavage",
+ "email": "mcavage@gmail.com"
},
{
- "email": "alex@cooperi.net",
- "name": "Alex Wilson"
+ "name": "Alex Wilson",
+ "email": "alex@cooperi.net"
}
],
"dependencies": {
- "asn1": ">=0.2.3 <0.3.0",
- "assert-plus": ">=0.2.0 <0.3.0",
- "dashdash": ">=1.10.1 <2.0.0",
- "ecc-jsbn": ">=0.0.1 <1.0.0",
- "jodid25519": ">=1.0.0 <2.0.0",
- "jsbn": ">=0.1.0 <0.2.0",
- "tweetnacl": ">=0.13.0 <1.0.0"
+ "asn1": "~0.2.3",
+ "assert-plus": "^1.0.0",
+ "dashdash": "^1.12.0",
+ "ecc-jsbn": "~0.1.1",
+ "getpass": "^0.1.1",
+ "jodid25519": "^1.0.0",
+ "jsbn": "~0.1.0",
+ "tweetnacl": "~0.13.0"
},
"description": "A library for finding and using SSH public keys",
"devDependencies": {
- "benchmark": ">=1.0.0 <2.0.0",
- "sinon": ">=1.17.2 <2.0.0",
- "tape": ">=3.5.0 <4.0.0",
- "temp": "0.8.2"
+ "benchmark": "^1.0.0",
+ "sinon": "^1.17.2",
+ "tape": "^3.5.0",
+ "temp": "^0.8.2"
},
"directories": {
"bin": "./bin",
@@ -84,33 +94,33 @@
"man": "./man/man1"
},
"dist": {
- "shasum": "ad7b47defca61c8415d964243b62b0ce60fbca38",
- "tarball": "http://registry.npmjs.org/sshpk/-/sshpk-1.7.4.tgz"
+ "shasum": "3b41351bbad5c34ddf4bd8119937efee31a46765",
+ "tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.9.2.tgz"
},
"engines": {
- "node": ">=0.8.0"
+ "node": ">=0.10.0"
},
- "gitHead": "9b86d45d512c97f6ea10b98a2970828dfb290310",
+ "gitHead": "a8b794384822a52eea5ed3b2f192a780b7909609",
"homepage": "https://github.com/arekinath/node-sshpk#readme",
"license": "MIT",
"main": "lib/index.js",
"maintainers": [
{
- "email": "alex@cooperi.net",
- "name": "arekinath"
+ "name": "arekinath",
+ "email": "alex@cooperi.net"
}
],
"man": [
- "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-conv.1",
- "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-sign.1",
- "/Users/alex.wilson/dev/sshpk/man/man1/sshpk-verify.1"
+ "/Users/alex.wilson/dev/node-sshpk/man/man1/sshpk-conv.1",
+ "/Users/alex.wilson/dev/node-sshpk/man/man1/sshpk-sign.1",
+ "/Users/alex.wilson/dev/node-sshpk/man/man1/sshpk-verify.1"
],
"name": "sshpk",
"optionalDependencies": {
- "ecc-jsbn": ">=0.0.1 <1.0.0",
- "jodid25519": ">=1.0.0 <2.0.0",
- "jsbn": ">=0.1.0 <0.2.0",
- "tweetnacl": ">=0.13.0 <1.0.0"
+ "ecc-jsbn": "~0.1.1",
+ "jodid25519": "^1.0.0",
+ "jsbn": "~0.1.0",
+ "tweetnacl": "~0.13.0"
},
"readme": "ERROR: No README data found!",
"repository": {
@@ -120,5 +130,5 @@
"scripts": {
"test": "tape test/*.js"
},
- "version": "1.7.4"
+ "version": "1.9.2"
}
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/package.json b/deps/npm/node_modules/request/node_modules/http-signature/package.json
index c7479c09ff..2f9211c9a7 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/package.json
+++ b/deps/npm/node_modules/request/node_modules/http-signature/package.json
@@ -1,7 +1,15 @@
{
"_args": [
[
- "http-signature@~1.1.0",
+ {
+ "raw": "http-signature@~1.1.0",
+ "scope": null,
+ "escapedName": "http-signature",
+ "name": "http-signature",
+ "rawSpec": "~1.1.0",
+ "spec": ">=1.1.0 <1.2.0",
+ "type": "range"
+ },
"/Users/rebecca/code/npm/node_modules/request"
]
],
@@ -12,16 +20,17 @@
"_location": "/request/http-signature",
"_nodeVersion": "0.12.9",
"_npmUser": {
- "email": "alex@cooperi.net",
- "name": "arekinath"
+ "name": "arekinath",
+ "email": "alex@cooperi.net"
},
"_npmVersion": "2.14.9",
"_phantomChildren": {},
"_requested": {
- "name": "http-signature",
"raw": "http-signature@~1.1.0",
- "rawSpec": "~1.1.0",
"scope": null,
+ "escapedName": "http-signature",
+ "name": "http-signature",
+ "rawSpec": "~1.1.0",
"spec": ">=1.1.0 <1.2.0",
"type": "range"
},
@@ -66,7 +75,7 @@
"directories": {},
"dist": {
"shasum": "df72e267066cd0ac67fb76adf8e134a8fbcf91bf",
- "tarball": "http://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz"
+ "tarball": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz"
},
"engines": {
"node": ">=0.8",