fsevents 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/Readme.md +12 -13
- package/node_modules/ansi/package.json +1 -2
- package/node_modules/are-we-there-yet/package.json +1 -2
- package/node_modules/asn1/.travis.yml +4 -0
- package/node_modules/asn1/lib/ber/reader.js +27 -33
- package/node_modules/asn1/lib/ber/writer.js +10 -11
- package/node_modules/asn1/package.json +21 -19
- package/node_modules/asn1/tst/ber/reader.test.js +36 -0
- package/node_modules/asn1/tst/ber/writer.test.js +74 -0
- package/node_modules/assert-plus/package.json +1 -0
- package/node_modules/{ctype → bl/node_modules/readable-stream/node_modules/core-util-is}/LICENSE +1 -6
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
- package/node_modules/boom/package.json +1 -1
- package/node_modules/commander/package.json +1 -1
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/core-util-is/package.json +17 -12
- package/node_modules/core-util-is/test.js +68 -0
- package/node_modules/dashdash/README.md +508 -0
- package/node_modules/dashdash/lib/dashdash.js +813 -0
- package/node_modules/dashdash/package.json +87 -0
- package/node_modules/deep-extend/LICENSE +1 -1
- package/node_modules/deep-extend/README.md +89 -52
- package/node_modules/deep-extend/index.js +1 -90
- package/node_modules/deep-extend/lib/deep-extend.js +144 -0
- package/node_modules/deep-extend/package.json +47 -16
- package/node_modules/deep-extend/test/index.spec.js +168 -5
- package/node_modules/delegates/package.json +1 -2
- package/node_modules/ecc-jsbn/.npmignore +15 -0
- package/node_modules/ecc-jsbn/LICENSE +21 -0
- package/node_modules/ecc-jsbn/README.md +8 -0
- package/node_modules/ecc-jsbn/index.js +57 -0
- package/node_modules/ecc-jsbn/lib/LICENSE-jsbn +40 -0
- package/node_modules/ecc-jsbn/lib/ec.js +561 -0
- package/node_modules/ecc-jsbn/lib/sec.js +170 -0
- package/node_modules/ecc-jsbn/package.json +63 -0
- package/node_modules/ecc-jsbn/test.js +14 -0
- package/node_modules/extsprintf/.gitmodules +6 -0
- package/node_modules/{path-is-absolute/license → extsprintf/LICENSE} +2 -4
- package/node_modules/extsprintf/Makefile +23 -0
- package/node_modules/extsprintf/Makefile.deps +39 -0
- package/node_modules/extsprintf/Makefile.targ +285 -0
- package/node_modules/extsprintf/README.md +39 -0
- package/node_modules/extsprintf/examples/simple.js +2 -0
- package/node_modules/{ctype/tools/jsl.conf → extsprintf/jsl.node.conf} +71 -63
- package/node_modules/extsprintf/lib/extsprintf.js +166 -0
- package/node_modules/extsprintf/package.json +48 -0
- package/node_modules/fstream/package.json +1 -2
- package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/package.json +4 -22
- package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/package.json +3 -21
- package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/package.json +4 -23
- package/node_modules/fstream-ignore/node_modules/minimatch/package.json +4 -24
- package/node_modules/fstream-ignore/package.json +1 -2
- package/node_modules/gauge/package.json +1 -2
- package/node_modules/har-validator/package.json +15 -15
- package/node_modules/has-unicode/package.json +1 -2
- package/node_modules/hawk/dist/client.js +340 -0
- package/node_modules/hawk/lib/browser.js +14 -20
- package/node_modules/hawk/package.json +10 -10
- package/node_modules/hawk/test/browser.js +134 -101
- package/node_modules/hawk/test/index.js +61 -61
- package/node_modules/hawk/test/server.js +72 -84
- package/node_modules/hawk/test/uri.js +52 -63
- package/node_modules/http-signature/CHANGES.md +39 -0
- package/node_modules/http-signature/http_signing.md +16 -17
- package/node_modules/http-signature/lib/index.js +6 -4
- package/node_modules/http-signature/lib/parser.js +43 -29
- package/node_modules/http-signature/lib/signer.js +290 -74
- package/node_modules/http-signature/lib/utils.js +112 -0
- package/node_modules/http-signature/lib/verify.js +47 -15
- package/node_modules/http-signature/package.json +20 -14
- package/node_modules/is-my-json-valid/index.js +16 -14
- package/node_modules/is-my-json-valid/package.json +16 -12
- package/node_modules/is-typedarray/LICENSE.md +18 -0
- package/node_modules/is-typedarray/README.md +16 -0
- package/node_modules/is-typedarray/index.js +41 -0
- package/node_modules/is-typedarray/package.json +63 -0
- package/node_modules/is-typedarray/test.js +34 -0
- package/node_modules/jodid25519/.npmignore +11 -0
- package/node_modules/jodid25519/.travis.yml +7 -0
- package/node_modules/jodid25519/AUTHORS.md +3 -0
- package/node_modules/jodid25519/LICENSE +23 -0
- package/node_modules/jodid25519/README.md +51 -0
- package/node_modules/jodid25519/almond.0 +42 -0
- package/node_modules/jodid25519/almond.1 +13 -0
- package/node_modules/jodid25519/index.js +35 -0
- package/node_modules/jodid25519/jsdoc.json +19 -0
- package/node_modules/jodid25519/lib/core.js +481 -0
- package/node_modules/jodid25519/lib/curve255.js +221 -0
- package/node_modules/jodid25519/lib/dh.js +111 -0
- package/node_modules/jodid25519/lib/eddsa.js +573 -0
- package/node_modules/jodid25519/lib/utils.js +198 -0
- package/node_modules/jodid25519/package.json +77 -0
- package/node_modules/jsbn/.npmignore +2 -0
- package/node_modules/jsbn/LICENSE +40 -0
- package/node_modules/jsbn/README.md +175 -0
- package/node_modules/jsbn/example.html +12 -0
- package/node_modules/jsbn/example.js +3 -0
- package/node_modules/jsbn/index.js +1358 -0
- package/node_modules/jsbn/package.json +60 -0
- package/node_modules/json-schema/README.md +5 -0
- package/node_modules/json-schema/draft-00/hyper-schema +68 -0
- package/node_modules/json-schema/draft-00/json-ref +26 -0
- package/node_modules/json-schema/draft-00/links +33 -0
- package/node_modules/json-schema/draft-00/schema +155 -0
- package/node_modules/json-schema/draft-01/hyper-schema +68 -0
- package/node_modules/json-schema/draft-01/json-ref +26 -0
- package/node_modules/json-schema/draft-01/links +33 -0
- package/node_modules/json-schema/draft-01/schema +155 -0
- package/node_modules/json-schema/draft-02/hyper-schema +68 -0
- package/node_modules/json-schema/draft-02/json-ref +26 -0
- package/node_modules/json-schema/draft-02/links +35 -0
- package/node_modules/json-schema/draft-02/schema +166 -0
- package/node_modules/json-schema/draft-03/examples/address +20 -0
- package/node_modules/json-schema/draft-03/examples/calendar +53 -0
- package/node_modules/json-schema/draft-03/examples/card +105 -0
- package/node_modules/json-schema/draft-03/examples/geo +8 -0
- package/node_modules/json-schema/draft-03/examples/interfaces +23 -0
- package/node_modules/json-schema/draft-03/hyper-schema +60 -0
- package/node_modules/json-schema/draft-03/json-ref +26 -0
- package/node_modules/json-schema/draft-03/links +35 -0
- package/node_modules/json-schema/draft-03/schema +174 -0
- package/node_modules/json-schema/draft-04/hyper-schema +60 -0
- package/node_modules/json-schema/draft-04/links +41 -0
- package/node_modules/json-schema/draft-04/schema +189 -0
- package/node_modules/json-schema/draft-zyp-json-schema-03.xml +1120 -0
- package/node_modules/json-schema/draft-zyp-json-schema-04.xml +1072 -0
- package/node_modules/json-schema/lib/links.js +52 -0
- package/node_modules/json-schema/lib/validate.js +260 -0
- package/node_modules/json-schema/package.json +67 -0
- package/node_modules/json-schema/test/tests.js +95 -0
- package/node_modules/jsprim/CHANGES.md +30 -0
- package/node_modules/jsprim/LICENSE +19 -0
- package/node_modules/jsprim/README.md +228 -0
- package/node_modules/jsprim/lib/jsprim.js +478 -0
- package/node_modules/jsprim/package.json +54 -0
- package/node_modules/lodash._basetostring/package.json +1 -2
- package/node_modules/lodash._createpadding/package.json +1 -2
- package/node_modules/lodash.pad/package.json +1 -2
- package/node_modules/lodash.padleft/package.json +1 -2
- package/node_modules/lodash.padright/package.json +1 -2
- package/node_modules/lodash.repeat/package.json +1 -2
- package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
- package/node_modules/node-pre-gyp/README.md +570 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +4 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/lib/nopt.js +2 -1
- package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/package.json +30 -37
- package/node_modules/node-pre-gyp/node_modules/nopt/package.json +37 -57
- package/node_modules/node-pre-gyp/node_modules/nopt/test/basic.js +22 -0
- package/node_modules/node-pre-gyp/package.json +17 -17
- package/node_modules/node-uuid/.npmignore +2 -0
- package/node_modules/node-uuid/README.md +12 -1
- package/node_modules/node-uuid/bower.json +1 -1
- package/node_modules/node-uuid/component.json +11 -4
- package/node_modules/node-uuid/package.json +25 -12
- package/node_modules/node-uuid/test/test.js +3 -0
- package/node_modules/node-uuid/uuid.js +70 -45
- package/node_modules/npmlog/.travis.yml +14 -0
- package/node_modules/npmlog/log.js +3 -0
- package/node_modules/npmlog/package.json +23 -20
- package/node_modules/npmlog/test/basic.js +8 -1
- package/node_modules/once/package.json +2 -3
- package/node_modules/pinkie/index.js +23 -7
- package/node_modules/pinkie/package.json +22 -15
- package/node_modules/pinkie/readme.md +17 -9
- package/node_modules/pinkie-promise/package.json +16 -14
- package/node_modules/pinkie-promise/readme.md +5 -3
- package/node_modules/rc/README.md +1 -1
- package/node_modules/rc/index.js +1 -1
- package/node_modules/rc/node_modules/minimist/package.json +1 -1
- package/node_modules/rc/package.json +12 -12
- package/node_modules/request/.eslintrc +1 -1
- package/node_modules/request/.travis.yml +4 -4
- package/node_modules/request/CHANGELOG.md +25 -0
- package/node_modules/request/README.md +12 -13
- package/node_modules/request/lib/har.js +84 -75
- package/node_modules/request/lib/redirect.js +2 -3
- package/node_modules/request/lib/tunnel.js +13 -18
- package/node_modules/request/package.json +17 -16
- package/node_modules/request/request.js +16 -59
- package/node_modules/rimraf/README.md +7 -2
- package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/package.json +5 -25
- package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/package.json +5 -25
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +42 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +58 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +25 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +3 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +122 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +3 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md +21 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +79 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +90 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +81 -0
- package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/package.json +3 -21
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +58 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +70 -0
- package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/package.json +4 -22
- package/node_modules/rimraf/node_modules/glob/package.json +2 -20
- package/node_modules/rimraf/package.json +10 -10
- package/node_modules/semver/README.md +25 -1
- package/node_modules/semver/package.json +10 -10
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/semver.js +0 -12
- package/node_modules/sshpk/.npmignore +8 -0
- package/node_modules/sshpk/.travis.yml +11 -0
- package/node_modules/sshpk/LICENSE +18 -0
- package/node_modules/sshpk/README.md +436 -0
- package/node_modules/sshpk/bin/sshpk-conv +183 -0
- package/node_modules/sshpk/lib/algs.js +168 -0
- package/node_modules/sshpk/lib/dhe.js +312 -0
- package/node_modules/sshpk/lib/ed-compat.js +94 -0
- package/node_modules/sshpk/lib/errors.js +58 -0
- package/node_modules/sshpk/lib/fingerprint.js +140 -0
- package/node_modules/sshpk/lib/formats/auto.js +73 -0
- package/node_modules/sshpk/lib/formats/pem.js +152 -0
- package/node_modules/sshpk/lib/formats/pkcs1.js +320 -0
- package/node_modules/sshpk/lib/formats/pkcs8.js +510 -0
- package/node_modules/sshpk/lib/formats/rfc4253.js +145 -0
- package/node_modules/sshpk/lib/formats/ssh-private.js +138 -0
- package/node_modules/sshpk/lib/formats/ssh.js +114 -0
- package/node_modules/sshpk/lib/index.js +25 -0
- package/node_modules/sshpk/lib/key.js +260 -0
- package/node_modules/sshpk/lib/private-key.js +224 -0
- package/node_modules/sshpk/lib/signature.js +237 -0
- package/node_modules/sshpk/lib/ssh-buffer.js +123 -0
- package/node_modules/sshpk/lib/utils.js +207 -0
- package/node_modules/sshpk/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +8 -0
- package/node_modules/sshpk/node_modules/assert-plus/README.md +155 -0
- package/node_modules/sshpk/node_modules/assert-plus/assert.js +206 -0
- package/node_modules/sshpk/node_modules/assert-plus/package.json +88 -0
- package/node_modules/sshpk/package.json +92 -0
- package/node_modules/strip-json-comments/cli.js +2 -2
- package/node_modules/strip-json-comments/package.json +13 -12
- package/node_modules/strip-json-comments/readme.md +11 -5
- package/node_modules/strip-json-comments/strip-json-comments.js +16 -7
- package/node_modules/tar/package.json +1 -2
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
- package/node_modules/tar-pack/node_modules/rimraf/package.json +1 -2
- package/node_modules/tar-pack/package.json +1 -2
- package/node_modules/tough-cookie/lib/cookie.js +1 -1
- package/node_modules/tough-cookie/package.json +7 -7
- package/node_modules/tweetnacl/.npmignore +4 -0
- package/node_modules/tweetnacl/CHANGELOG.md +128 -0
- package/node_modules/tweetnacl/README.md +463 -0
- package/node_modules/tweetnacl/nacl-fast.js +2418 -0
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -0
- package/node_modules/tweetnacl/nacl.js +1205 -0
- package/node_modules/tweetnacl/nacl.min.js +1 -0
- package/node_modules/tweetnacl/package.json +101 -0
- package/node_modules/uid-number/package.json +2 -3
- package/node_modules/verror/.gitmodules +0 -0
- package/node_modules/verror/LICENSE +19 -0
- package/node_modules/verror/Makefile +35 -0
- package/node_modules/verror/Makefile.targ +285 -0
- package/node_modules/verror/README.md +120 -0
- package/node_modules/verror/examples/levels-verror.js +36 -0
- package/node_modules/verror/examples/levels-werror.js +34 -0
- package/node_modules/verror/examples/varargs.js +6 -0
- package/node_modules/verror/examples/verror.js +13 -0
- package/node_modules/verror/examples/werror.js +14 -0
- package/node_modules/verror/jsl.node.conf +139 -0
- package/node_modules/verror/lib/verror.js +157 -0
- package/node_modules/verror/package.json +51 -0
- package/node_modules/verror/tests/tst.inherit.js +100 -0
- package/node_modules/verror/tests/tst.verror.js +156 -0
- package/node_modules/verror/tests/tst.werror.js +179 -0
- package/package.json +3 -3
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
- package/node_modules/core-util-is/util.js +0 -106
- package/node_modules/ctype/.npmignore +0 -1
- package/node_modules/ctype/CHANGELOG +0 -78
- package/node_modules/ctype/README +0 -82
- package/node_modules/ctype/README.old +0 -298
- package/node_modules/ctype/ctf.js +0 -245
- package/node_modules/ctype/ctio.js +0 -1485
- package/node_modules/ctype/ctype.js +0 -944
- package/node_modules/ctype/man/man3ctype/ctio.3ctype +0 -241
- package/node_modules/ctype/package.json +0 -51
- package/node_modules/ctype/tools/jsstyle +0 -839
- package/node_modules/http-signature/lib/util.js +0 -306
- package/node_modules/inflight/node_modules/once/package.json +0 -86
- package/node_modules/inflight/node_modules/once/test/once.js +0 -23
- package/node_modules/rimraf/node_modules/glob/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/once/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/once/README.md +0 -51
- package/node_modules/rimraf/node_modules/once/once.js +0 -21
- package/node_modules/rimraf/node_modules/once/package.json +0 -84
- package/node_modules/rimraf/node_modules/once/test/once.js +0 -23
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
- package/node_modules/wrappy/LICENSE +0 -15
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/.npmignore +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/README.md +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/example.js +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/index.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.npmignore +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/LICENSE.md +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/Makefile +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/README.md +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/example.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/index.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/test/balanced.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/LICENSE +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/README.markdown +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/example/map.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/index.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/test/map.js +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.npmignore +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.travis.yml +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/CONTRIBUTING.md +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/LICENSE +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/README.md +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/abbrev.js +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/test.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/.eslintrc +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/LICENSE +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/README.md +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/inflight.js +0 -0
- /package/node_modules/{fstream-ignore/node_modules/minimatch → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/LICENSE +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/README.md +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/test/basic.js +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/wrappy.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/test.js +0 -0
- /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/README.md +0 -0
- /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/minimatch.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/README.md +0 -0
- /package/node_modules/{inflight/node_modules/once → rimraf/node_modules/glob/node_modules/once/node_modules/wrappy}/LICENSE +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/once.js +0 -0
- /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/index.js +0 -0
- /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/readme.md +0 -0
- /package/node_modules/{deep-extend → verror}/.npmignore +0 -0
@@ -0,0 +1,128 @@
|
|
1
|
+
TweetNaCl.js Changelog
|
2
|
+
======================
|
3
|
+
|
4
|
+
|
5
|
+
v0.13.2
|
6
|
+
-------
|
7
|
+
|
8
|
+
* Fixed undefined variable bug in fast version of Poly1305. No worries, this
|
9
|
+
bug was *never* triggered.
|
10
|
+
|
11
|
+
* Specified CC0 public domain dedication.
|
12
|
+
|
13
|
+
* Updated development dependencies.
|
14
|
+
|
15
|
+
|
16
|
+
v0.13.1
|
17
|
+
-------
|
18
|
+
|
19
|
+
* Exclude `crypto` and `buffer` modules from browserify builds.
|
20
|
+
|
21
|
+
|
22
|
+
v0.13.0
|
23
|
+
-------
|
24
|
+
|
25
|
+
* Made `nacl-fast` the default version in NPM package. Now
|
26
|
+
`require("tweetnacl")` will use fast version; to get the original version,
|
27
|
+
use `require("tweetnacl/nacl.js")`.
|
28
|
+
|
29
|
+
* Cleanup temporary array after generating random bytes.
|
30
|
+
|
31
|
+
|
32
|
+
v0.12.2
|
33
|
+
-------
|
34
|
+
|
35
|
+
* Improved performance of curve operations, making `nacl.scalarMult`, `nacl.box`,
|
36
|
+
`nacl.sign` and related functions up to 3x faster in `nacl-fast` version.
|
37
|
+
|
38
|
+
|
39
|
+
v0.12.1
|
40
|
+
-------
|
41
|
+
|
42
|
+
* Significantly improved performance of Salsa20 (~1.5x faster) and
|
43
|
+
Poly1305 (~3.5x faster) in `nacl-fast` version.
|
44
|
+
|
45
|
+
|
46
|
+
v0.12.0
|
47
|
+
-------
|
48
|
+
|
49
|
+
* Instead of using the given secret key directly, TweetNaCl.js now copies it to
|
50
|
+
a new array in `nacl.box.keyPair.fromSecretKey` and
|
51
|
+
`nacl.sign.keyPair.fromSecretKey`.
|
52
|
+
|
53
|
+
|
54
|
+
v0.11.2
|
55
|
+
-------
|
56
|
+
|
57
|
+
* Added new constant: `nacl.sign.seedLength`.
|
58
|
+
|
59
|
+
|
60
|
+
v0.11.1
|
61
|
+
-------
|
62
|
+
|
63
|
+
* Even faster hash for both short and long inputs (in `nacl-fast`).
|
64
|
+
|
65
|
+
|
66
|
+
v0.11.0
|
67
|
+
-------
|
68
|
+
|
69
|
+
* Implement `nacl.sign.keyPair.fromSeed` to enable creation of sign key pairs
|
70
|
+
deterministically from a 32-byte seed. (It behaves like
|
71
|
+
[libsodium's](http://doc.libsodium.org/public-key_cryptography/public-key_signatures.html)
|
72
|
+
`crypto_sign_seed_keypair`: the seed becomes a secret part of the secret key.)
|
73
|
+
|
74
|
+
* Fast version now has an improved hash implementation that is 2x-5x faster.
|
75
|
+
|
76
|
+
* Fixed benchmarks, which may have produced incorrect measurements.
|
77
|
+
|
78
|
+
|
79
|
+
v0.10.1
|
80
|
+
-------
|
81
|
+
|
82
|
+
* Exported undocumented `nacl.lowlevel.crypto_core_hsalsa20`.
|
83
|
+
|
84
|
+
|
85
|
+
v0.10.0
|
86
|
+
-------
|
87
|
+
|
88
|
+
* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal
|
89
|
+
with signed messages, and new `nacl.sign.detached` and
|
90
|
+
`nacl.sign.detached.verify` are available.
|
91
|
+
|
92
|
+
Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a
|
93
|
+
message and "detached" signature. This was unlike NaCl's API, which dealt with
|
94
|
+
signed messages (concatenation of signature and message).
|
95
|
+
|
96
|
+
The new API is:
|
97
|
+
|
98
|
+
nacl.sign(message, secretKey) -> signedMessage
|
99
|
+
nacl.sign.open(signedMessage, publicKey) -> message | null
|
100
|
+
|
101
|
+
Since detached signatures are common, two new API functions were introduced:
|
102
|
+
|
103
|
+
nacl.sign.detached(message, secretKey) -> signature
|
104
|
+
nacl.sign.detached.verify(message, signature, publicKey) -> true | false
|
105
|
+
|
106
|
+
(Note that it's `verify`, not `open`, and it returns a boolean value, unlike
|
107
|
+
`open`, which returns an "unsigned" message.)
|
108
|
+
|
109
|
+
* NPM package now comes without `test` directory to keep it small.
|
110
|
+
|
111
|
+
|
112
|
+
v0.9.2
|
113
|
+
------
|
114
|
+
|
115
|
+
* Improved documentation.
|
116
|
+
* Fast version: increased theoretical message size limit from 2^32-1 to 2^52
|
117
|
+
bytes in Poly1305 (and thus, secretbox and box). However this has no impact
|
118
|
+
in practice since JavaScript arrays or ArrayBuffers are limited to 32-bit
|
119
|
+
indexes, and most implementations won't allocate more than a gigabyte or so.
|
120
|
+
(Obviously, there are no tests for the correctness of implementation.) Also,
|
121
|
+
it's not recommended to use messages that large without splitting them into
|
122
|
+
smaller packets anyway.
|
123
|
+
|
124
|
+
|
125
|
+
v0.9.1
|
126
|
+
------
|
127
|
+
|
128
|
+
* Initial release
|
@@ -0,0 +1,463 @@
|
|
1
|
+
TweetNaCl.js
|
2
|
+
============
|
3
|
+
|
4
|
+
Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/)
|
5
|
+
to JavaScript for modern browsers and Node.js. Public domain.
|
6
|
+
|
7
|
+
[
|
8
|
+
](https://travis-ci.org/dchest/tweetnacl-js)
|
9
|
+
|
10
|
+
[Demo](https://dchest.github.io/tweetnacl-js/)
|
11
|
+
|
12
|
+
**:warning: Beta version. The library is stable and API is frozen, however
|
13
|
+
it has not been independently reviewed. If you can help reviewing it, please
|
14
|
+
[contact me](mailto:dmitry@codingrobots.com).**
|
15
|
+
|
16
|
+
Documentation
|
17
|
+
=============
|
18
|
+
|
19
|
+
* [Overview](#overview)
|
20
|
+
* [Installation](#installation)
|
21
|
+
* [Usage](#usage)
|
22
|
+
* [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box)
|
23
|
+
* [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox)
|
24
|
+
* [Scalar multiplication](#scalar-multiplication)
|
25
|
+
* [Signatures](#signatures)
|
26
|
+
* [Hashing](#hashing)
|
27
|
+
* [Random bytes generation](#random-bytes-generation)
|
28
|
+
* [Constant-time comparison](#constant-time-comparison)
|
29
|
+
* [Utilities](#utilities)
|
30
|
+
* [Examples](#examples)
|
31
|
+
* [System requirements](#system-requirements)
|
32
|
+
* [Development and testing](#development-and-testing)
|
33
|
+
* [Contributors](#contributors)
|
34
|
+
* [Who uses it](#who-uses-it)
|
35
|
+
|
36
|
+
|
37
|
+
Overview
|
38
|
+
--------
|
39
|
+
|
40
|
+
The primary goal of this project is to produce a translation of TweetNaCl to
|
41
|
+
JavaScript which is as close as possible to the original C implementation, plus
|
42
|
+
a thin layer of idiomatic high-level API on top of it.
|
43
|
+
|
44
|
+
There are two versions, you can use either of them:
|
45
|
+
|
46
|
+
* `nacl.js` is the port of TweetNaCl with minimum differences from the
|
47
|
+
original + high-level API.
|
48
|
+
|
49
|
+
* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with
|
50
|
+
faster versions.
|
51
|
+
|
52
|
+
|
53
|
+
Installation
|
54
|
+
------------
|
55
|
+
|
56
|
+
You can install TweetNaCl.is via a package manager:
|
57
|
+
|
58
|
+
[Bower](http://bower.io):
|
59
|
+
|
60
|
+
$ bower install tweetnacl
|
61
|
+
|
62
|
+
[NPM](https://www.npmjs.org/):
|
63
|
+
|
64
|
+
$ npm install tweetnacl
|
65
|
+
|
66
|
+
or [download source code](https://github.com/dchest/tweetnacl-js/releases).
|
67
|
+
|
68
|
+
|
69
|
+
Usage
|
70
|
+
------
|
71
|
+
|
72
|
+
All API functions accept and return bytes as `Uint8Array`s. If you need to
|
73
|
+
encode or decode strings, use functions from `nacl.util` namespace.
|
74
|
+
|
75
|
+
### Public-key authenticated encryption (box)
|
76
|
+
|
77
|
+
Implements *curve25519-xsalsa20-poly1305*.
|
78
|
+
|
79
|
+
#### nacl.box.keyPair()
|
80
|
+
|
81
|
+
Generates a new random key pair for box and returns it as an object with
|
82
|
+
`publicKey` and `secretKey` members:
|
83
|
+
|
84
|
+
{
|
85
|
+
publicKey: ..., // Uint8Array with 32-byte public key
|
86
|
+
secretKey: ... // Uint8Array with 32-byte secret key
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
#### nacl.box.keyPair.fromSecretKey(secretKey)
|
91
|
+
|
92
|
+
Returns a key pair for box with public key corresponding to the given secret
|
93
|
+
key.
|
94
|
+
|
95
|
+
#### nacl.box(message, nonce, theirPublicKey, mySecretKey)
|
96
|
+
|
97
|
+
Encrypt and authenticates message using peer's public key, our secret key, and
|
98
|
+
the given nonce, which must be unique for each distinct message for a key pair.
|
99
|
+
|
100
|
+
Returns an encrypted and authenticated message, which is
|
101
|
+
`nacl.box.overheadLength` longer than the original message.
|
102
|
+
|
103
|
+
#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey)
|
104
|
+
|
105
|
+
Authenticates and decrypts the given box with peer's public key, our secret
|
106
|
+
key, and the given nonce.
|
107
|
+
|
108
|
+
Returns the original message, or `false` if authentication fails.
|
109
|
+
|
110
|
+
#### nacl.box.before(theirPublicKey, mySecretKey)
|
111
|
+
|
112
|
+
Returns a precomputed shared key which can be used in `nacl.box.after` and
|
113
|
+
`nacl.box.open.after`.
|
114
|
+
|
115
|
+
#### nacl.box.after(message, nonce, sharedKey)
|
116
|
+
|
117
|
+
Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`.
|
118
|
+
|
119
|
+
#### nacl.box.open.after(box, nonce, sharedKey)
|
120
|
+
|
121
|
+
Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`.
|
122
|
+
|
123
|
+
#### nacl.box.publicKeyLength = 32
|
124
|
+
|
125
|
+
Length of public key in bytes.
|
126
|
+
|
127
|
+
#### nacl.box.secretKeyLength = 32
|
128
|
+
|
129
|
+
Length of secret key in bytes.
|
130
|
+
|
131
|
+
#### nacl.box.sharedKeyLength = 32
|
132
|
+
|
133
|
+
Length of precomputed shared key in bytes.
|
134
|
+
|
135
|
+
#### nacl.box.nonceLength = 24
|
136
|
+
|
137
|
+
Length of nonce in bytes.
|
138
|
+
|
139
|
+
#### nacl.box.overheadLength = 16
|
140
|
+
|
141
|
+
Length of overhead added to box compared to original message.
|
142
|
+
|
143
|
+
|
144
|
+
### Secret-key authenticated encryption (secretbox)
|
145
|
+
|
146
|
+
Implements *xsalsa20-poly1305*.
|
147
|
+
|
148
|
+
#### nacl.secretbox(message, nonce, key)
|
149
|
+
|
150
|
+
Encrypt and authenticates message using the key and the nonce. The nonce must
|
151
|
+
be unique for each distinct message for this key.
|
152
|
+
|
153
|
+
Returns an encrypted and authenticated message, which is
|
154
|
+
`nacl.secretbox.overheadLength` longer than the original message.
|
155
|
+
|
156
|
+
#### nacl.secretbox.open(box, nonce, key)
|
157
|
+
|
158
|
+
Authenticates and decrypts the given secret box using the key and the nonce.
|
159
|
+
|
160
|
+
Returns the original message, or `false` if authentication fails.
|
161
|
+
|
162
|
+
#### nacl.secretbox.keyLength = 32
|
163
|
+
|
164
|
+
Length of key in bytes.
|
165
|
+
|
166
|
+
#### nacl.secretbox.nonceLength = 24
|
167
|
+
|
168
|
+
Length of nonce in bytes.
|
169
|
+
|
170
|
+
#### nacl.secretbox.overheadLength = 16
|
171
|
+
|
172
|
+
Length of overhead added to secret box compared to original message.
|
173
|
+
|
174
|
+
|
175
|
+
### Scalar multiplication
|
176
|
+
|
177
|
+
Implements *curve25519*.
|
178
|
+
|
179
|
+
#### nacl.scalarMult(n, p)
|
180
|
+
|
181
|
+
Multiplies an integer `n` by a group element `p` and returns the resulting
|
182
|
+
group element.
|
183
|
+
|
184
|
+
#### nacl.scalarMult.base(n)
|
185
|
+
|
186
|
+
Multiplies an integer `n` by a standard group element and returns the resulting
|
187
|
+
group element.
|
188
|
+
|
189
|
+
#### nacl.scalarMult.scalarLength = 32
|
190
|
+
|
191
|
+
Length of scalar in bytes.
|
192
|
+
|
193
|
+
#### nacl.scalarMult.groupElementLength = 32
|
194
|
+
|
195
|
+
Length of group element in bytes.
|
196
|
+
|
197
|
+
|
198
|
+
### Signatures
|
199
|
+
|
200
|
+
Implements [ed25519](http://ed25519.cr.yp.to).
|
201
|
+
|
202
|
+
#### nacl.sign.keyPair()
|
203
|
+
|
204
|
+
Generates new random key pair for signing and returns it as an object with
|
205
|
+
`publicKey` and `secretKey` members:
|
206
|
+
|
207
|
+
{
|
208
|
+
publicKey: ..., // Uint8Array with 32-byte public key
|
209
|
+
secretKey: ... // Uint8Array with 64-byte secret key
|
210
|
+
}
|
211
|
+
|
212
|
+
#### nacl.sign.keyPair.fromSecretKey(secretKey)
|
213
|
+
|
214
|
+
Returns a signing key pair with public key corresponding to the given
|
215
|
+
64-byte secret key. The secret key must have been generated by
|
216
|
+
`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`.
|
217
|
+
|
218
|
+
#### nacl.sign.keyPair.fromSeed(seed)
|
219
|
+
|
220
|
+
Returns a new signing key pair generated deterministically from a 32-byte seed.
|
221
|
+
The seed must contain enough entropy to be secure. This method is not
|
222
|
+
recommended for general use: instead, use `nacl.sign.keyPair` to generate a new
|
223
|
+
key pair from a random seed.
|
224
|
+
|
225
|
+
#### nacl.sign(message, secretKey)
|
226
|
+
|
227
|
+
Signs the message using the secret key and returns a signed message.
|
228
|
+
|
229
|
+
#### nacl.sign.open(signedMessage, publicKey)
|
230
|
+
|
231
|
+
Verifies the signed message and returns the message without signature.
|
232
|
+
|
233
|
+
Returns `null` if verification failed.
|
234
|
+
|
235
|
+
#### nacl.sign.detached(message, secretKey)
|
236
|
+
|
237
|
+
Signs the message using the secret key and returns a signature.
|
238
|
+
|
239
|
+
#### nacl.sign.detached.verify(message, signature, publicKey)
|
240
|
+
|
241
|
+
Verifies the signature for the message and returns `true` if verification
|
242
|
+
succeeded or `false` if it failed.
|
243
|
+
|
244
|
+
#### nacl.sign.publicKeyLength = 32
|
245
|
+
|
246
|
+
Length of signing public key in bytes.
|
247
|
+
|
248
|
+
#### nacl.sign.secretKeyLength = 64
|
249
|
+
|
250
|
+
Length of signing secret key in bytes.
|
251
|
+
|
252
|
+
#### nacl.sign.seedLength = 32
|
253
|
+
|
254
|
+
Length of seed for `nacl.sign.keyPair.fromSeed` in bytes.
|
255
|
+
|
256
|
+
#### nacl.sign.signatureLength = 64
|
257
|
+
|
258
|
+
Length of signature in bytes.
|
259
|
+
|
260
|
+
|
261
|
+
### Hashing
|
262
|
+
|
263
|
+
Implements *SHA-512*.
|
264
|
+
|
265
|
+
#### nacl.hash(message)
|
266
|
+
|
267
|
+
Returns SHA-512 hash of the message.
|
268
|
+
|
269
|
+
#### nacl.hash.hashLength = 64
|
270
|
+
|
271
|
+
Length of hash in bytes.
|
272
|
+
|
273
|
+
|
274
|
+
### Random bytes generation
|
275
|
+
|
276
|
+
#### nacl.randomBytes(length)
|
277
|
+
|
278
|
+
Returns a `Uint8Array` of the given length containing random bytes of
|
279
|
+
cryptographic quality.
|
280
|
+
|
281
|
+
**Implementation note**
|
282
|
+
|
283
|
+
TweetNaCl.js uses the following methods to generate random bytes,
|
284
|
+
depending on the platform it runs on:
|
285
|
+
|
286
|
+
* `window.crypto.getRandomValues` (WebCrypto standard)
|
287
|
+
* `window.msCrypto.getRandomValues` (Internet Explorer 11)
|
288
|
+
* `crypto.randomBytes` (Node.js)
|
289
|
+
|
290
|
+
Note that browsers are required to throw `QuotaExceededError` exception if
|
291
|
+
requested `length` is more than 65536, so do not ask for more than 65536 bytes
|
292
|
+
in *one call* (multiple calls to get as many bytes as you like are okay:
|
293
|
+
browsers can generate infinite amount of random bytes without any bad
|
294
|
+
consequences).
|
295
|
+
|
296
|
+
If the platform doesn't provide a suitable PRNG, the following functions,
|
297
|
+
which require random numbers, will throw exception:
|
298
|
+
|
299
|
+
* `nacl.randomBytes`
|
300
|
+
* `nacl.box.keyPair`
|
301
|
+
* `nacl.sign.keyPair`
|
302
|
+
|
303
|
+
Other functions are deterministic and will continue working.
|
304
|
+
|
305
|
+
If a platform you are targeting doesn't implement secure random number
|
306
|
+
generator, but you somehow have a cryptographically-strong source of entropy
|
307
|
+
(not `Math.random`!), and you know what you are doing, you can plug it into
|
308
|
+
TweetNaCl.js like this:
|
309
|
+
|
310
|
+
nacl.setPRNG(function(x, n) {
|
311
|
+
// ... copy n random bytes into x ...
|
312
|
+
});
|
313
|
+
|
314
|
+
Note that `nacl.setPRNG` *completely replaces* internal random byte generator
|
315
|
+
with the one provided.
|
316
|
+
|
317
|
+
|
318
|
+
### Constant-time comparison
|
319
|
+
|
320
|
+
#### nacl.verify(x, y)
|
321
|
+
|
322
|
+
Compares `x` and `y` in constant time and returns `true` if their lengths are
|
323
|
+
non-zero and equal, and their contents are equal.
|
324
|
+
|
325
|
+
Returns `false` if either of the arguments has zero length, or arguments have
|
326
|
+
different lengths, or their contents differ.
|
327
|
+
|
328
|
+
|
329
|
+
### Utilities
|
330
|
+
|
331
|
+
Encoding/decoding functions are provided for convenience. They are correct,
|
332
|
+
however their performance and wide compatibility with uncommon runtimes is not
|
333
|
+
something that is considered important compared to the simplicity and size of
|
334
|
+
implementation. You can use third-party libraries if you need to.
|
335
|
+
|
336
|
+
#### nacl.util.decodeUTF8(string)
|
337
|
+
|
338
|
+
Decodes string and returns `Uint8Array` of bytes.
|
339
|
+
|
340
|
+
#### nacl.util.encodeUTF8(array)
|
341
|
+
|
342
|
+
Encodes `Uint8Array` or `Array` of bytes into string.
|
343
|
+
|
344
|
+
#### nacl.util.decodeBase64(string)
|
345
|
+
|
346
|
+
Decodes Base-64 encoded string and returns `Uint8Array` of bytes.
|
347
|
+
|
348
|
+
#### nacl.util.encodeBase64(array)
|
349
|
+
|
350
|
+
Encodes `Uint8Array` or `Array` of bytes into string using Base-64 encoding.
|
351
|
+
|
352
|
+
|
353
|
+
System requirements
|
354
|
+
-------------------
|
355
|
+
|
356
|
+
TweetNaCl.js supports modern browsers that have a cryptographically secure
|
357
|
+
pseudorandom number generator and typed arrays, including the latest versions
|
358
|
+
of:
|
359
|
+
|
360
|
+
* Chrome
|
361
|
+
* Firefox
|
362
|
+
* Safari (Mac, iOS)
|
363
|
+
* Internet Explorer 11
|
364
|
+
|
365
|
+
Other systems:
|
366
|
+
|
367
|
+
* Node.js (we test on 0.10 and later)
|
368
|
+
|
369
|
+
|
370
|
+
Development and testing
|
371
|
+
------------------------
|
372
|
+
|
373
|
+
Install NPM modules needed for development:
|
374
|
+
|
375
|
+
$ npm install
|
376
|
+
|
377
|
+
To build minified versions:
|
378
|
+
|
379
|
+
$ npm run build
|
380
|
+
|
381
|
+
Tests use minified version, so make sure to rebuild it every time you change
|
382
|
+
`nacl.js` or `nacl-fast.js`.
|
383
|
+
|
384
|
+
### Testing
|
385
|
+
|
386
|
+
To run tests in Node.js:
|
387
|
+
|
388
|
+
$ npm test
|
389
|
+
|
390
|
+
By default all tests described here work on `nacl.min.js`. To test other
|
391
|
+
versions, set environment variable `NACL_SRC` to the file name you want to test.
|
392
|
+
For example, the following command will test fast minified version:
|
393
|
+
|
394
|
+
$ NACL_SRC=nacl-fast.min.js npm test
|
395
|
+
|
396
|
+
To run full suite of tests in Node.js, including comparing outputs of
|
397
|
+
JavaScript port to outputs of the original C version:
|
398
|
+
|
399
|
+
$ npm run testall
|
400
|
+
|
401
|
+
To prepare tests for browsers:
|
402
|
+
|
403
|
+
$ npm run browser
|
404
|
+
|
405
|
+
and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to
|
406
|
+
run them.
|
407
|
+
|
408
|
+
To run headless browser tests with `testling`:
|
409
|
+
|
410
|
+
$ npm run testling
|
411
|
+
|
412
|
+
(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.)
|
413
|
+
|
414
|
+
### Benchmarking
|
415
|
+
|
416
|
+
To run benchmarks in Node.js:
|
417
|
+
|
418
|
+
$ npm run bench
|
419
|
+
$ NACL_SRC=nacl-fast.min.js npm run bench
|
420
|
+
|
421
|
+
To run benchmarks in a browser, open `test/benchmark/bench.html` (or
|
422
|
+
`test/benchmark/bench-fast.html`).
|
423
|
+
|
424
|
+
|
425
|
+
Contributors
|
426
|
+
------------
|
427
|
+
|
428
|
+
JavaScript port:
|
429
|
+
|
430
|
+
* [Dmitry Chestnykh](http://github.com/dchest) (ported xsalsa20, poly1305, curve25519)
|
431
|
+
* [Devi Mandiri](https://github.com/devi) (ported curve25519, ed25519, sha512)
|
432
|
+
|
433
|
+
Original authors of [NaCl](http://nacl.cr.yp.to), [TweetNaCl](http://tweetnacl.cr.yp.to)
|
434
|
+
and [Poly1305-donna](https://github.com/floodyberry/poly1305-donna)
|
435
|
+
(who are *not* responsible for any errors in this implementation):
|
436
|
+
|
437
|
+
* [Daniel J. Bernstein](http://cr.yp.to/djb.html)
|
438
|
+
* Wesley Janssen
|
439
|
+
* [Tanja Lange](http://hyperelliptic.org/tanja)
|
440
|
+
* [Peter Schwabe](http://www.cryptojedi.org/users/peter/)
|
441
|
+
* [Matthew Dempsky](https://github.com/mdempsky)
|
442
|
+
* [Andrew Moon](https://github.com/floodyberry)
|
443
|
+
|
444
|
+
Contributors have dedicated their work to the public domain.
|
445
|
+
|
446
|
+
This software is distributed without any warranty.
|
447
|
+
|
448
|
+
|
449
|
+
Third-party libraries based on TweetNaCl.js
|
450
|
+
-------------------------------------------
|
451
|
+
|
452
|
+
* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation
|
453
|
+
* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption
|
454
|
+
* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html)
|
455
|
+
|
456
|
+
|
457
|
+
Who uses it
|
458
|
+
-----------
|
459
|
+
|
460
|
+
Some notable users of TweetNaCl.js:
|
461
|
+
|
462
|
+
* [miniLock](http://minilock.io/)
|
463
|
+
* [Stellar](https://www.stellar.org/)
|