├── jspm_packages ├── .loaderversions ├── npm │ ├── is-array@1.0.1 │ │ ├── .npmignore │ │ ├── .jepso-ci.json │ │ ├── .jspm-hash │ │ ├── Makefile │ │ ├── package.json │ │ ├── History.md │ │ ├── component.json │ │ ├── Readme.md │ │ ├── index.js │ │ ├── .jspm.json │ │ └── test │ │ │ └── test.html │ ├── buffer@3.3.1 │ │ ├── .npmignore │ │ ├── test │ │ │ ├── node │ │ │ │ ├── README.txt │ │ │ │ ├── test-buffer-big.js │ │ │ │ ├── test-buffer-slice.js │ │ │ │ ├── test-buffer-ascii.js │ │ │ │ ├── test-buffer-concat.js │ │ │ │ ├── test-buffer-inspect.js │ │ │ │ ├── test-buffer-bytelength.js │ │ │ │ └── test-buffer-indexof.js │ │ │ ├── node-es6 │ │ │ │ ├── README.txt │ │ │ │ └── test-buffer-iterator.js │ │ │ ├── deprecated.js │ │ │ ├── static.js │ │ │ ├── slice.js │ │ │ ├── compare.js │ │ │ ├── base64.js │ │ │ ├── basic.js │ │ │ ├── to-string.js │ │ │ ├── methods.js │ │ │ ├── write.js │ │ │ ├── from-string.js │ │ │ ├── constructor.js │ │ │ └── _polyfill.js │ │ ├── .jspm-hash │ │ ├── .travis.yml │ │ ├── .zuul.yml │ │ ├── LICENSE │ │ ├── package.json │ │ └── .jspm.json │ ├── sha.js@2.4.2 │ │ ├── .npmignore │ │ ├── .jspm-hash │ │ ├── .travis.yml │ │ ├── index.js │ │ ├── hexpp.js │ │ ├── package.json │ │ ├── sha224.js │ │ ├── LICENSE │ │ ├── bin.js │ │ ├── README.md │ │ ├── sha384.js │ │ ├── hash.js │ │ ├── test │ │ │ ├── vectors.js │ │ │ ├── hash.js │ │ │ └── test.js │ │ ├── .jspm.json │ │ ├── sha.js │ │ ├── sha1.js │ │ └── sha256.js │ ├── util@0.10.3 │ │ ├── .npmignore │ │ ├── .jspm-hash │ │ ├── support │ │ │ ├── isBuffer.js │ │ │ └── isBufferBrowser.js │ │ ├── .zuul.yml │ │ ├── .travis.yml │ │ ├── README.md │ │ ├── package.json │ │ ├── test │ │ │ ├── browser │ │ │ │ ├── inspect.js │ │ │ │ └── is.js │ │ │ └── node │ │ │ │ ├── log.js │ │ │ │ ├── debug.js │ │ │ │ ├── format.js │ │ │ │ ├── util.js │ │ │ │ └── inspect.js │ │ ├── LICENSE │ │ └── .jspm.json │ ├── buffer-crc32@0.2.5 │ │ ├── .npmignore │ │ ├── .jspm-hash │ │ ├── .travis.yml │ │ ├── package.json │ │ ├── LICENSE │ │ ├── README.md │ │ ├── .jspm.json │ │ ├── tests │ │ │ └── crc.test.js │ │ └── index.js │ ├── util@0.10.3.js │ ├── buffer@3.3.1.js │ ├── ieee754@1.1.6.js │ ├── is-array@1.0.1.js │ ├── sha.js@2.4.2.js │ ├── base64-js@0.0.8.js │ ├── process@0.10.1.js │ ├── buffer-crc32@0.2.5.js │ ├── inherits@2.0.1.js │ ├── inherits@2.0.1 │ │ ├── inherits.js │ │ ├── .jspm-hash │ │ ├── package.json │ │ ├── inherits_browser.js │ │ ├── LICENSE │ │ ├── .jspm.json │ │ └── README.md │ ├── base64-js@0.0.8 │ │ ├── .travis.yml │ │ ├── .jspm-hash │ │ ├── test │ │ │ ├── url-safe.js │ │ │ └── convert.js │ │ ├── package.json │ │ ├── README.md │ │ ├── LICENSE.MIT │ │ ├── .jspm.json │ │ └── lib │ │ │ └── b64.js │ ├── ieee754@1.1.6 │ │ ├── .jspm-hash │ │ ├── .travis.yml │ │ ├── .zuul.yml │ │ ├── test │ │ │ └── basic.js │ │ ├── package.json │ │ ├── README.md │ │ ├── .jspm.json │ │ ├── index.js │ │ └── LICENSE │ └── process@0.10.1 │ │ ├── .jspm-hash │ │ ├── index.js │ │ ├── package.json │ │ ├── README.md │ │ ├── LICENSE │ │ ├── browser.js │ │ └── .jspm.json └── github │ ├── jspm │ ├── nodelibs-fs@0.1.2 │ │ ├── package.json │ │ ├── .jspm-hash │ │ ├── .jspm.json │ │ └── index.js │ ├── nodelibs-fs@0.1.2.js │ ├── nodelibs-buffer@0.1.0.js │ ├── nodelibs-util@0.1.0.js │ ├── nodelibs-process@0.1.1.js │ ├── nodelibs-process@0.1.1 │ │ ├── index.js │ │ ├── .jspm-hash │ │ ├── .jspm.json │ │ └── package.json │ ├── nodelibs-util@0.1.0 │ │ ├── package.json │ │ ├── .jspm-hash │ │ ├── index.js │ │ └── .jspm.json │ └── nodelibs-buffer@0.1.0 │ │ ├── .jspm-hash │ │ ├── package.json │ │ ├── index.js │ │ └── .jspm.json │ └── jmcriffey │ ├── bower-traceur@0.0.88.js │ ├── bower-traceur-runtime@0.0.88 │ ├── .gitignore │ ├── .jspm-hash │ ├── bower.json │ ├── package.json │ ├── update.js │ ├── Gruntfile.js │ ├── .jspm.json │ └── README.md │ ├── bower-traceur@0.0.88 │ ├── .gitignore │ ├── .jspm-hash │ ├── bower.json │ ├── package.json │ ├── update.js │ ├── Gruntfile.js │ ├── .jspm.json │ └── README.md │ └── bower-traceur-runtime@0.0.88.js ├── package.json ├── index.html ├── README.md ├── config.js └── hash-implementations ├── sha256 ├── jsSha2.js └── CryptoJS.js ├── sha3 └── CryptoJS.js └── md5 ├── CryptoJS.js ├── yamd5.min.js └── myers.js /jspm_packages/.loaderversions: -------------------------------------------------------------------------------- 1 | ^0.18.2 -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/.npmignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/.npmignore: -------------------------------------------------------------------------------- 1 | perf/ 2 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node/README.txt: -------------------------------------------------------------------------------- 1 | node core buffer tests 2 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3.js: -------------------------------------------------------------------------------- 1 | module.exports = require("npm:util@0.10.3/util"); -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1.js: -------------------------------------------------------------------------------- 1 | module.exports = require("npm:buffer@3.3.1/index"); -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6.js: -------------------------------------------------------------------------------- 1 | module.exports = require("npm:ieee754@1.1.6/index"); -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1.js: -------------------------------------------------------------------------------- 1 | module.exports = require("npm:is-array@1.0.1/index"); -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/.jepso-ci.json: -------------------------------------------------------------------------------- 1 | { 2 | "url": "/test/test.html" 3 | } -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2.js: -------------------------------------------------------------------------------- 1 | module.exports = require("npm:sha.js@2.4.2/index"); -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-fs@0.1.2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "registry": "npm" 3 | } 4 | -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8.js: -------------------------------------------------------------------------------- 1 | module.exports = require("npm:base64-js@0.0.8/lib/b64"); -------------------------------------------------------------------------------- /jspm_packages/npm/process@0.10.1.js: -------------------------------------------------------------------------------- 1 | module.exports = require("npm:process@0.10.1/browser"); -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5.js: -------------------------------------------------------------------------------- 1 | module.exports = require("npm:buffer-crc32@0.2.5/index"); -------------------------------------------------------------------------------- /jspm_packages/npm/inherits@2.0.1.js: -------------------------------------------------------------------------------- 1 | module.exports = require("npm:inherits@2.0.1/inherits_browser"); -------------------------------------------------------------------------------- /jspm_packages/npm/inherits@2.0.1/inherits.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | module.exports = require("util").inherits; 3 | -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-fs@0.1.2.js: -------------------------------------------------------------------------------- 1 | module.exports = require("github:jspm/nodelibs-fs@0.1.2/index"); -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-buffer@0.1.0.js: -------------------------------------------------------------------------------- 1 | module.exports = require("github:jspm/nodelibs-buffer@0.1.0/index"); -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-util@0.1.0.js: -------------------------------------------------------------------------------- 1 | module.exports = require("github:jspm/nodelibs-util@0.1.0/index"); -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-process@0.1.1.js: -------------------------------------------------------------------------------- 1 | module.exports = require("github:jspm/nodelibs-process@0.1.1/index"); -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.8" 4 | - "0.10" 5 | - "0.11" -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node-es6/README.txt: -------------------------------------------------------------------------------- 1 | node buffer tests that require ES6 (e.g. "for..of" construct) 2 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur@0.0.88.js: -------------------------------------------------------------------------------- 1 | module.exports = require("github:jmcriffey/bower-traceur@0.0.88/traceur"); -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-process@0.1.1/index.js: -------------------------------------------------------------------------------- 1 | module.exports = System._nodeRequire ? process : require('process'); -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur-runtime@0.0.88/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .DS_Store 3 | .iml 4 | .ipr 5 | .iws 6 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur@0.0.88/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .DS_Store 3 | .idea/ 4 | .iml 5 | .ipr 6 | .iws 7 | -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8/.jspm-hash: -------------------------------------------------------------------------------- 1 | 1101e9544f4a76b1bc3b26d452ca96d7a35e7978b675c3a548a0a8cab5f57664a8e4b1c3jspm-npm@0.230.16 -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/.jspm-hash: -------------------------------------------------------------------------------- 1 | c87bf2db2aa8e82f78d41fcfb82b40bb033bf44ef546ed54965492c32a4a7baa108a416bjspm-npm@0.230.16 -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6/.jspm-hash: -------------------------------------------------------------------------------- 1 | 2e1013219c6d6712973ec54d981ec19e5579de9799914b932bd37a50b983c5e7c90ae93bjspm-npm@0.230.16 -------------------------------------------------------------------------------- /jspm_packages/npm/inherits@2.0.1/.jspm-hash: -------------------------------------------------------------------------------- 1 | b17d08d326b4423e568eff719f91b0b1cbdf69f1ec6654eb093e6d57f407c8d4f2d04c6fjspm-npm@0.230.16 -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/.jspm-hash: -------------------------------------------------------------------------------- 1 | e9850cc2cc860c3bc0977e84ccf0dd464584279a99914b932bd37a50b983c5e7c90ae93bjspm-npm@0.230.16 -------------------------------------------------------------------------------- /jspm_packages/npm/process@0.10.1/.jspm-hash: -------------------------------------------------------------------------------- 1 | 842457cc51cfed72dc775afeeafb8c603437272599914b932bd37a50b983c5e7c90ae93bjspm-npm@0.230.16 -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/.jspm-hash: -------------------------------------------------------------------------------- 1 | bc345745589215a7200b5af774e68c3e44d2f18899914b932bd37a50b983c5e7c90ae93bjspm-npm@0.230.16 -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/.jspm-hash: -------------------------------------------------------------------------------- 1 | 7afb1afe50805246489e3db7fe0ed379336ac0f999914b932bd37a50b983c5e7c90ae93bjspm-npm@0.230.16 -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5/.jspm-hash: -------------------------------------------------------------------------------- 1 | db003ac2671e62ebd6ece78ea2c2e1b405736e9199914b932bd37a50b983c5e7c90ae93bjspm-npm@0.230.16 -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-fs@0.1.2/.jspm-hash: -------------------------------------------------------------------------------- 1 | e295454174ed9e95b9383f8184859d76c610d19c99914b932bd37a50b983c5e7c90ae93bjspm-github@0.12.10.16 -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-util@0.1.0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "registry": "npm", 3 | "dependencies": { 4 | "util": "^0.10.3" 5 | } 6 | } -------------------------------------------------------------------------------- /jspm_packages/npm/process@0.10.1/index.js: -------------------------------------------------------------------------------- 1 | // for now just expose the builtin process global from node.js 2 | module.exports = global.process; 3 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur-runtime@0.0.88.js: -------------------------------------------------------------------------------- 1 | module.exports = require("github:jmcriffey/bower-traceur-runtime@0.0.88/traceur-runtime"); -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-buffer@0.1.0/.jspm-hash: -------------------------------------------------------------------------------- 1 | 59c7427feb449b75ff772d899fbb79766b75f78299914b932bd37a50b983c5e7c90ae93bjspm-github@0.12.10.16 -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-buffer@0.1.0/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "registry": "npm", 3 | "dependencies": { 4 | "buffer": "^3.0.1" 5 | } 6 | } -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-process@0.1.1/.jspm-hash: -------------------------------------------------------------------------------- 1 | 2dd9498d7e5ce134e4ff9dd41319cda4e31f993c99914b932bd37a50b983c5e7c90ae93bjspm-github@0.12.10.16 -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-util@0.1.0/.jspm-hash: -------------------------------------------------------------------------------- 1 | 108d15fdf020621a254a7f09bdc94001e5a8dbcb99914b932bd37a50b983c5e7c90ae93bjspm-github@0.12.10.16 -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-util@0.1.0/index.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | module.exports = System._nodeRequire ? System._nodeRequire('util') : require('util'); -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur@0.0.88/.jspm-hash: -------------------------------------------------------------------------------- 1 | 8b30bf29df7121a4ea9e1e561bc188150a59df5e21087372a67bd5b0a9b3a1134b931ffbjspm-github@0.12.10.16 -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-buffer@0.1.0/index.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | module.exports = System._nodeRequire ? System._nodeRequire('buffer') : require('buffer'); -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur-runtime@0.0.88/.jspm-hash: -------------------------------------------------------------------------------- 1 | 8a32702c9a209696e87fc890d64ac16390a6bdde0acd5b6220df5559ab3e6888abf56d4bjspm-github@0.12.10.16 -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-process@0.1.1/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "registry": "jspm", 3 | "dependencies": { 4 | "process": "npm:process@^0.10.0" 5 | } 6 | } -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-process@0.1.1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "registry": "jspm", 3 | "dependencies": { 4 | "process": "npm:process@^0.10.0" 5 | } 6 | } -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-fs@0.1.2/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "registry": "npm", 3 | "format": "cjs", 4 | "ignore": [ 5 | "node_modules" 6 | ], 7 | "dependencies": {} 8 | } -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.6 4 | - 0.8 5 | notifications: 6 | email: 7 | recipients: 8 | - brianloveswords@gmail.com -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/support/isBuffer.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | module.exports = function isBuffer(arg) { 4 | return arg instanceof Buffer; 5 | }; 6 | })(require("buffer").Buffer); 7 | -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-util@0.1.0/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "registry": "npm", 3 | "format": "cjs", 4 | "ignore": [ 5 | "node_modules" 6 | ], 7 | "dependencies": { 8 | "util": "util@^0.10.3" 9 | } 10 | } -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.12" 5 | - "iojs" 6 | env: 7 | - TEST_SUITE=lint 8 | - TEST_SUITE=unit 9 | script: "npm run-script $TEST_SUITE" 10 | 11 | -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-buffer@0.1.0/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "registry": "npm", 3 | "format": "cjs", 4 | "ignore": [ 5 | "node_modules" 6 | ], 7 | "dependencies": { 8 | "buffer": "buffer@^3.0.1" 9 | } 10 | } -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/Makefile: -------------------------------------------------------------------------------- 1 | 2 | build: components index.js 3 | @component build --dev 4 | 5 | components: component.json 6 | @component install --dev 7 | 8 | clean: 9 | rm -fr build components template.js 10 | 11 | .PHONY: clean 12 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/.zuul.yml: -------------------------------------------------------------------------------- 1 | ui: mocha-qunit 2 | browsers: 3 | - name: chrome 4 | version: 27..latest 5 | - name: firefox 6 | version: latest 7 | - name: safari 8 | version: latest 9 | - name: ie 10 | version: 9..latest 11 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur-runtime@0.0.88/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "traceur-runtime", 3 | "version": "0.0.88", 4 | "main": "./traceur-runtime.js", 5 | "ignore": [ 6 | "node_modules", 7 | "Gruntfile.js", 8 | "*.json", 9 | ".*" 10 | ] 11 | } -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur@0.0.88/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "traceur", 3 | "version": "0.0.88", 4 | "main": "./traceur.js", 5 | "ignore": [ 6 | "node_modules", 7 | "Gruntfile.js", 8 | "update.js", 9 | "*.json", 10 | ".*" 11 | ] 12 | } -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/support/isBufferBrowser.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | module.exports = function isBuffer(arg) { 3 | return arg && typeof arg === 'object' 4 | && typeof arg.copy === 'function' 5 | && typeof arg.fill === 'function' 6 | && typeof arg.readUInt8 === 'function'; 7 | } -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/package.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "name": "is-array", 4 | "repository": "retrofox/is-array", 5 | "description": "Check if the given value is an Array", 6 | "version": "1.0.1", 7 | "keywords": ["isArray", "es5", "array"], 8 | "dependencies": {}, 9 | "license": "MIT" 10 | } 11 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "jspm": { 3 | "dependencies": { 4 | "buffer-crc32": "npm:buffer-crc32@^0.2.5", 5 | "sha.js": "npm:sha.js@^2.4.2" 6 | }, 7 | "devDependencies": { 8 | "traceur": "github:jmcriffey/bower-traceur@0.0.88", 9 | "traceur-runtime": "github:jmcriffey/bower-traceur-runtime@0.0.88" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/History.md: -------------------------------------------------------------------------------- 1 | 2 | 1.0.0 / 2013-02-01 3 | ================== 4 | 5 | * Merge pull request #2 from jepso-ci-4-all/master 6 | * Add jepso-ci badge to readme 7 | * Merge pull request #1 from jepso-ci-4-all/master 8 | * Add jepso-ci 9 | * Add tests 10 | * remove es5 from readme confuses ppl 11 | * use Array.isArray if exists. 12 | -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "isArray", 3 | "repo": "yields/isArray", 4 | "description": "Check if the given value is an Array", 5 | "version": "1.0.0", 6 | "keywords": ["isArray", "es5", "array"], 7 | "dependencies": {}, 8 | "development": {}, 9 | "license": "MIT", 10 | "scripts": [ 11 | "index.js" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node/test-buffer-big.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | 'use strict'; 4 | var Buffer = require("../../../buffer@3.3.1").Buffer; 5 | if (process.env.OBJECT_IMPL) 6 | Buffer.TYPED_ARRAY_SUPPORT = false; 7 | var common = {}; 8 | var assert = require("assert"); 9 | assert.throws(function() { 10 | new Buffer(0x3fffffff + 1); 11 | }, RangeError); 12 | })(require("process")); 13 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 'iojs' 4 | env: 5 | global: 6 | - secure: AUsK+8fYSpwIMHcVt8Mu9SpG9RPHp4XDAwCQfpU3d5U65q8OVVC6C+XjvnNmEd2PoEJRHem8ZXEyRVfGM1sttKZLZP70TEKZOpOiRQnZiTQCAJ92TfGsDj/F4LoWSjUZUpfeg9b3iSp8G5dVw3+q9QZPIu6eykASK6bfcg//Cyg= 7 | - secure: eQBKJWu7XbhAN4ZvOOhMenC0IPpoYj+wZVVzzsLwUppfJqlrHV0CUW8rJdvZNiaGhYhoyHTnAcynpTE5kZfg3XjevOvF8PGY5wUYCki9BI+rp+pvVPZE/DNUAQpFR2gd2nxMJ4kYv7GVb6i/DfuqJa0h8IuY4zcMuKWwbQd3Az8= 8 | -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 'iojs' 4 | env: 5 | global: 6 | - secure: f3NrmOV/A7oACn47J1mkIpH8Sn/LINtluZvo/9pGo3Ss4+D2lyt7UawpedHtnYgU9WEyjPSi7pDWopUrIzusQ2trLYRJr8WAOEyHlgaepDyy4BW3ghGMKHMsS05kilYLP8nu1sRd6y1AcUYKw+kUrrSPanI7kViWVQ5d5DuwXO8= 7 | - secure: a6teILh33z5fbGQbh5/EkFfAyXfa2fPJG1upy9K+jLAbG4WZxXD+YmXG9Tz33/2NJm6UplGfTJ8IQEXgxEfAFk3ao3xfKxzm3i64XxtroSlXIFNSiQKogxDfLEtWDoNNCodPHaV3ATEqxGJ5rkkUeU1+ROWW0sjG5JR26k8/Hfg= 8 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '0.8' 4 | - '0.10' 5 | env: 6 | global: 7 | - secure: AdUubswCR68/eGD+WWjwTHgFbelwQGnNo81j1IOaUxKw+zgFPzSnFEEtDw7z98pWgg7p9DpCnyzzSnSllP40wq6AG19OwyUJjSLoZK57fp+r8zwTQwWiSqUgMu2YSMmKJPIO/aoSGpRQXT+L1nRrHoUJXgFodyIZgz40qzJeZjc= 8 | - secure: heQuxPVsQ7jBbssoVKimXDpqGjQFiucm6W5spoujmspjDG7oEcHD9ANo9++LoRPrsAmNx56SpMK5fNfVmYediw6SvhXm4Mxt56/fYCrLDBtgGG+1neCeffAi8z1rO8x48m77hcQ6YhbUL5R9uBimUjMX92fZcygAt8Rg804zjFo= 9 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/.zuul.yml: -------------------------------------------------------------------------------- 1 | ui: tape 2 | scripts: 3 | - "./test/_polyfill.js" 4 | browsers: 5 | - name: chrome 6 | version: 39..latest 7 | - name: firefox 8 | version: 34..latest 9 | - name: safari 10 | version: 5..latest 11 | - name: ie 12 | version: 8..latest 13 | - name: opera 14 | version: 11..latest 15 | - name: iphone 16 | version: 4.3..latest 17 | - name: ipad 18 | version: 4.3..latest 19 | - name: android 20 | version: 5.0..latest 21 | -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6/.zuul.yml: -------------------------------------------------------------------------------- 1 | ui: tape 2 | scripts: 3 | - "./test/_polyfill.js" 4 | browsers: 5 | - name: chrome 6 | version: 39..latest 7 | - name: firefox 8 | version: 34..latest 9 | - name: safari 10 | version: 5..latest 11 | - name: ie 12 | version: 8..latest 13 | - name: opera 14 | version: 11..latest 15 | - name: iphone 16 | version: 4.3..latest 17 | - name: ipad 18 | version: 4.3..latest 19 | - name: android 20 | version: 4.0..latest 21 | -------------------------------------------------------------------------------- /jspm_packages/npm/process@0.10.1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Roman Shtylman ", 3 | "name": "process", 4 | "description": "process information for node.js and browsers", 5 | "keywords": [ 6 | "process" 7 | ], 8 | "version": "0.10.1", 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/shtylman/node-process.git" 12 | }, 13 | "browser": "./browser.js", 14 | "main": "./index.js", 15 | "engines": { 16 | "node": ">= 0.6.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/README.md: -------------------------------------------------------------------------------- 1 | # util 2 | 3 | [![Build Status](https://travis-ci.org/defunctzombie/node-util.png?branch=master)](https://travis-ci.org/defunctzombie/node-util) 4 | 5 | node.js [util](http://nodejs.org/api/util.html) module as a module 6 | 7 | ## install via [npm](npmjs.org) 8 | 9 | ```shell 10 | npm install util 11 | ``` 12 | 13 | ## browser support 14 | 15 | This module also works in modern browsers. If you need legacy browser support you will need to polyfill ES5 features. 16 | -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | jepso-ci status 3 | 4 | # isArray 5 | 6 | Check if the given `value` is an `Array`. 7 | 8 | ## Installation 9 | 10 | $ component install yields/isArray 11 | 12 | ## API 13 | 14 | ### isArray(val) 15 | 16 | ```javascript 17 | isArray(arguments); 18 | // > false 19 | isArray(); 20 | // > false 21 | isArray([]); 22 | // > true 23 | ``` 24 | 25 | ## License 26 | 27 | MIT 28 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/index.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | var exports = module.exports = function SHA(algorithm) { 3 | algorithm = algorithm.toLowerCase(); 4 | var Algorithm = exports[algorithm]; 5 | if (!Algorithm) 6 | throw new Error(algorithm + ' is not supported (we accept pull requests)'); 7 | return new Algorithm(); 8 | }; 9 | exports.sha = require("./sha"); 10 | exports.sha1 = require("./sha1"); 11 | exports.sha224 = require("./sha224"); 12 | exports.sha256 = require("./sha256"); 13 | exports.sha384 = require("./sha384"); 14 | exports.sha512 = require("./sha512"); 15 | -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8/test/url-safe.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | var test = require("tape"), 3 | b64 = require("../lib/b64"); 4 | test('decode url-safe style base64 strings', function(t) { 5 | var expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff]; 6 | var actual = b64.toByteArray('//++/++/++//'); 7 | for (var i = 0; i < actual.length; i++) { 8 | t.equal(actual[i], expected[i]); 9 | } 10 | actual = b64.toByteArray('__--_--_--__'); 11 | for (var i = 0; i < actual.length; i++) { 12 | t.equal(actual[i], expected[i]); 13 | } 14 | t.end(); 15 | }); 16 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node/test-buffer-slice.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | 'use strict'; 4 | var Buffer = require("../../../buffer@3.3.1").Buffer; 5 | if (process.env.OBJECT_IMPL) 6 | Buffer.TYPED_ARRAY_SUPPORT = false; 7 | var common = {}; 8 | var assert = require("assert"); 9 | var Buffer = require("../../../buffer@3.3.1").Buffer; 10 | var buff = new Buffer(Buffer.poolSize + 1); 11 | var slicedBuffer = buff.slice(); 12 | assert.equal(slicedBuffer.parent, buff, 'slicedBufffer should have its parent set to the original ' + ' buffer'); 13 | })(require("process")); 14 | -------------------------------------------------------------------------------- /jspm_packages/npm/inherits@2.0.1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inherits", 3 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 | "version": "2.0.1", 5 | "keywords": [ 6 | "inheritance", 7 | "class", 8 | "klass", 9 | "oop", 10 | "object-oriented", 11 | "inherits", 12 | "browser", 13 | "browserify" 14 | ], 15 | "main": "./inherits.js", 16 | "browser": "./inherits_browser.js", 17 | "repository": "git://github.com/isaacs/inherits", 18 | "license": "ISC", 19 | "scripts": { 20 | "test": "node test" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/deprecated.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('.get (deprecated)', function(t) { 8 | var b = new B([7, 42]); 9 | t.equal(b.get(0), 7); 10 | t.equal(b.get(1), 42); 11 | t.end(); 12 | }); 13 | test('.set (deprecated)', function(t) { 14 | var b = new B(2); 15 | b.set(7, 0); 16 | b.set(42, 1); 17 | t.equal(b[0], 7); 18 | t.equal(b[1], 42); 19 | t.end(); 20 | }); 21 | })(require("process")); 22 | -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/index.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * isArray 4 | */ 5 | 6 | var isArray = Array.isArray; 7 | 8 | /** 9 | * toString 10 | */ 11 | 12 | var str = Object.prototype.toString; 13 | 14 | /** 15 | * Whether or not the given `val` 16 | * is an array. 17 | * 18 | * example: 19 | * 20 | * isArray([]); 21 | * // > true 22 | * isArray(arguments); 23 | * // > false 24 | * isArray(''); 25 | * // > false 26 | * 27 | * @param {mixed} val 28 | * @return {bool} 29 | */ 30 | 31 | module.exports = isArray || function (val) { 32 | return !! val && '[object Array]' == str.call(val); 33 | }; 34 | -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6/test/basic.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var ieee754 = require("../index"); 4 | var test = require("tape"); 5 | var EPSILON = 0.00001; 6 | test('read float', function(t) { 7 | var buf = new Buffer(4); 8 | buf.writeFloatLE(42.42, 0); 9 | var num = ieee754.read(buf, 0, true, 23, 4); 10 | t.ok(Math.abs(num - 42.42) < EPSILON); 11 | t.end(); 12 | }); 13 | test('write float', function(t) { 14 | var buf = new Buffer(4); 15 | ieee754.write(buf, 42.42, 0, true, 23, 4); 16 | var num = buf.readFloatLE(0); 17 | t.ok(Math.abs(num - 42.42) < EPSILON); 18 | t.end(); 19 | }); 20 | })(require("buffer").Buffer); 21 | -------------------------------------------------------------------------------- /jspm_packages/github/jspm/nodelibs-fs@0.1.2/index.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | if (System._nodeRequire) { 3 | module.exports = System._nodeRequire('fs'); 4 | } 5 | else { 6 | 7 | exports.readFileSync = function(address) { 8 | var output; 9 | var xhr = new XMLHttpRequest(); 10 | xhr.open('GET', address, false); 11 | xhr.onreadystatechange = function(e) { 12 | if (xhr.readyState == 4) { 13 | var status = xhr.status; 14 | if ((status > 399 && status < 600) || status == 400) { 15 | throw 'File read error on ' + address; 16 | } 17 | else 18 | output = xhr.responseText; 19 | } 20 | } 21 | xhr.send(null); 22 | return output; 23 | }; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur@0.0.88/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bower-traceur", 3 | "description": "A Bower package for the Google Traceur compiler.", 4 | "version": "0.0.88", 5 | "homepage": "http://ambition.com", 6 | "scripts": { 7 | "build": "npm install && grunt" 8 | }, 9 | "author": { 10 | "name": "Jeff McRiffey", 11 | "email": "jeff.mcriffey@ambition.com", 12 | "url": "https://github.com/jmcriffey" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/jmcriffey/bower-traceur.git" 17 | }, 18 | "devDependencies": { 19 | "traceur": "0.0.88", 20 | "grunt": "~0.4.2", 21 | "grunt-contrib-copy": "~0.5.0", 22 | "grunt-contrib-uglify": "~0.3.2", 23 | "grunt-cli": "^0.1.13" 24 | } 25 | } -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur-runtime@0.0.88/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bower-traceur-runtime", 3 | "description": "A Bower package for the Google Traceur runtime.", 4 | "version": "0.0.88", 5 | "homepage": "http://ambition.com", 6 | "scripts": { 7 | "build": "npm install && grunt" 8 | }, 9 | "author": { 10 | "name": "Jeff McRiffey", 11 | "email": "jeff.mcriffey@ambition.com", 12 | "url": "https://github.com/jmcriffey" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/jmcriffey/bower-traceur-runtime.git" 17 | }, 18 | "devDependencies": { 19 | "traceur": "0.0.88", 20 | "grunt": "~0.4.2", 21 | "grunt-contrib-copy": "~0.5.0", 22 | "grunt-contrib-uglify": "~0.3.2", 23 | "grunt-cli": "^0.1.13" 24 | } 25 | } -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Joyent", 4 | "url": "http://www.joyent.com" 5 | }, 6 | "name": "util", 7 | "description": "Node.JS util module", 8 | "keywords": [ 9 | "util" 10 | ], 11 | "version": "0.10.3", 12 | "homepage": "https://github.com/defunctzombie/node-util", 13 | "repository": { 14 | "type": "git", 15 | "url": "git://github.com/defunctzombie/node-util" 16 | }, 17 | "main": "./util.js", 18 | "scripts": { 19 | "test": "node test/node/*.js && zuul test/browser/*.js" 20 | }, 21 | "dependencies": { 22 | "inherits": "2.0.1" 23 | }, 24 | "license": "MIT", 25 | "devDependencies": { 26 | "zuul": "~1.0.9" 27 | }, 28 | "browser": { 29 | "./support/isBuffer.js": "./support/isBufferBrowser.js" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /jspm_packages/npm/inherits@2.0.1/inherits_browser.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | if (typeof Object.create === 'function') { 3 | // implementation from standard node.js 'util' module 4 | module.exports = function inherits(ctor, superCtor) { 5 | ctor.super_ = superCtor 6 | ctor.prototype = Object.create(superCtor.prototype, { 7 | constructor: { 8 | value: ctor, 9 | enumerable: false, 10 | writable: true, 11 | configurable: true 12 | } 13 | }); 14 | }; 15 | } else { 16 | // old school shim for old browsers 17 | module.exports = function inherits(ctor, superCtor) { 18 | ctor.super_ = superCtor 19 | var TempCtor = function () {} 20 | TempCtor.prototype = superCtor.prototype 21 | ctor.prototype = new TempCtor() 22 | ctor.prototype.constructor = ctor 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur@0.0.88/update.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | "format global"; 3 | var fs = require('fs'); 4 | var exec = require('child_process').exec; 5 | 6 | 7 | var bower = require('./bower.json'); 8 | var pkg = require('./package.json'); 9 | var version = process.argv[2]; 10 | 11 | console.log('version:', version); 12 | bower.version = version; 13 | pkg.version = version; 14 | pkg.devDependencies.traceur = version; 15 | 16 | fs.writeFileSync('bower.json', JSON.stringify(bower, null, 2)); 17 | fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2)); 18 | 19 | exec('rm -rf node_modules', function() { 20 | exec('npm run build', function (error, stdout, stderr) { 21 | console.log(stdout); 22 | 23 | if (stderr) { 24 | console.log(stderr); 25 | } 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur-runtime@0.0.88/update.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | "format global"; 3 | var fs = require('fs'); 4 | var exec = require('child_process').exec; 5 | 6 | 7 | var bower = require('./bower.json'); 8 | var pkg = require('./package.json'); 9 | var version = process.argv[2]; 10 | 11 | console.log('version:', version); 12 | bower.version = version; 13 | pkg.version = version; 14 | pkg.devDependencies.traceur = version; 15 | 16 | fs.writeFileSync('bower.json', JSON.stringify(bower, null, 2)); 17 | fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2)); 18 | 19 | exec('rm -rf node_modules', function() { 20 | exec('npm run build', function (error, stdout, stderr) { 21 | console.log(stdout); 22 | 23 | if (stderr) { 24 | console.log(stderr); 25 | } 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /jspm_packages/npm/inherits@2.0.1/LICENSE: -------------------------------------------------------------------------------- 1 | The ISC License 2 | 3 | Copyright (c) Isaac Z. Schlueter 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15 | PERFORMANCE OF THIS SOFTWARE. 16 | 17 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/hexpp.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | function toHex (buf, group, wrap, LE) { 3 | buf = buf.buffer || buf 4 | var s = '' 5 | var l = buf.byteLength || buf.length 6 | for (var i = 0; i < l ; i++) { 7 | var byteParam = (i & 0xfffffffc) | (!LE ? i % 4 : 3 - i % 4) 8 | s += ((buf[byteParam] >> 4).toString(16)) + 9 | ((buf[byteParam] & 0xf).toString(16)) + 10 | (group - 1 === i % group ? ' ' : '') + 11 | (wrap - 1 === i % wrap ? '\n' : '') 12 | } 13 | return s 14 | } 15 | 16 | var hexpp = module.exports = function hexpp (buffer, opts) { 17 | opts = opts || {} 18 | opts.groups = opts.groups || 4 19 | opts.wrap = opts.wrap || 16 20 | return toHex(buffer, opts.groups, opts.wrap, opts.bigendian, opts.ints) 21 | } 22 | 23 | hexpp.defaults = function (opts) { 24 | return function (b) { 25 | return hexpp(b, opts) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "T. Jameson Little ", 3 | "name": "base64-js", 4 | "description": "Base64 encoding/decoding in pure JS", 5 | "version": "0.0.8", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/beatgammit/base64-js.git" 9 | }, 10 | "main": "lib/b64.js", 11 | "scripts": { 12 | "test": "tape test/*.js" 13 | }, 14 | "testling": { 15 | "files": "test/*.js", 16 | "browsers": [ 17 | "ie/6..latest", 18 | "chrome/4..latest", 19 | "firefox/3..latest", 20 | "safari/5.1..latest", 21 | "opera/11.0..latest", 22 | "iphone/6", 23 | "ipad/6" 24 | ] 25 | }, 26 | "engines": { 27 | "node": ">= 0.4" 28 | }, 29 | "license": "MIT", 30 | "dependencies": {}, 31 | "devDependencies": { 32 | "tape": "~2.3.2" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node/test-buffer-ascii.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | 'use strict'; 4 | var Buffer = require("../../../buffer@3.3.1").Buffer; 5 | if (process.env.OBJECT_IMPL) 6 | Buffer.TYPED_ARRAY_SUPPORT = false; 7 | var common = {}; 8 | var assert = require("assert"); 9 | assert.equal(Buffer('hérité').toString('ascii'), 'hC)ritC)'); 10 | var input = 'C’est, graphiquement, la réunion d’un accent aigu ' + 'et d’un accent grave.'; 11 | var expected = 'Cb\u0000\u0019est, graphiquement, la rC)union ' + 'db\u0000\u0019un accent aigu et db\u0000\u0019un ' + 'accent grave.'; 12 | var buf = Buffer(input); 13 | for (var i = 0; i < expected.length; ++i) { 14 | assert.equal(buf.slice(i).toString('ascii'), expected.slice(i)); 15 | if (input.charCodeAt(i) > 65535) 16 | ++i; 17 | if (input.charCodeAt(i) > 127) 18 | ++i; 19 | } 20 | })(require("process")); 21 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | test 6 | 7 | 8 | 9 | Fork me on GitHub 10 |
loading...
11 | 12 | 13 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node/test-buffer-concat.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | 'use strict'; 4 | var Buffer = require("../../../buffer@3.3.1").Buffer; 5 | if (process.env.OBJECT_IMPL) 6 | Buffer.TYPED_ARRAY_SUPPORT = false; 7 | var common = {}; 8 | var assert = require("assert"); 9 | var zero = []; 10 | var one = [new Buffer('asdf')]; 11 | var long = []; 12 | for (var i = 0; i < 10; i++) 13 | long.push(new Buffer('asdf')); 14 | var flatZero = Buffer.concat(zero); 15 | var flatOne = Buffer.concat(one); 16 | var flatLong = Buffer.concat(long); 17 | var flatLongLen = Buffer.concat(long, 40); 18 | assert(flatZero.length === 0); 19 | assert(flatOne.toString() === 'asdf'); 20 | assert(flatOne === one[0]); 21 | assert(flatLong.toString() === (new Array(10 + 1).join('asdf'))); 22 | assert(flatLongLen.toString() === (new Array(10 + 1).join('asdf'))); 23 | })(require("process")); 24 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sha.js", 3 | "description": "streaming sha1 hash in pure javascript", 4 | "version": "2.4.2", 5 | "homepage": "https://github.com/crypto-browserify/sha.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/crypto-browserify/sha.js.git" 9 | }, 10 | "dependencies": { 11 | "inherits": "^2.0.1" 12 | }, 13 | "devDependencies": { 14 | "buffer": "~2.3.2", 15 | "hash-test-vectors": "^1.3.1", 16 | "standard": "^4.0.0", 17 | "tape": "~2.3.2", 18 | "typedarray": "0.0.6" 19 | }, 20 | "bin": "./bin.js", 21 | "scripts": { 22 | "prepublish": "npm ls && npm run unit", 23 | "lint": "standard", 24 | "test": "npm run lint && npm run unit", 25 | "unit": "set -e; for t in test/*.js; do node $t; done;" 26 | }, 27 | "author": "Dominic Tarr (dominictarr.com)", 28 | "license": "MIT" 29 | } 30 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/test/browser/inspect.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | var assert = require("assert"); 3 | var util = require("../../util"); 4 | suite('inspect'); 5 | test('util.inspect - test for sparse array', function() { 6 | var a = ['foo', 'bar', 'baz']; 7 | assert.equal(util.inspect(a), '[ \'foo\', \'bar\', \'baz\' ]'); 8 | delete a[1]; 9 | assert.equal(util.inspect(a), '[ \'foo\', , \'baz\' ]'); 10 | assert.equal(util.inspect(a, true), '[ \'foo\', , \'baz\', [length]: 3 ]'); 11 | assert.equal(util.inspect(new Array(5)), '[ , , , , ]'); 12 | }); 13 | test('util.inspect - exceptions should print the error message, not \'{}\'', function() { 14 | assert.equal(util.inspect(new Error()), '[Error]'); 15 | assert.equal(util.inspect(new Error('FAIL')), '[Error: FAIL]'); 16 | assert.equal(util.inspect(new TypeError('FAIL')), '[TypeError: FAIL]'); 17 | assert.equal(util.inspect(new SyntaxError('FAIL')), '[SyntaxError: FAIL]'); 18 | }); 19 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur@0.0.88/Gruntfile.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | "format global"; 3 | module.exports = function(grunt) { 4 | var pkg = grunt.file.readJSON('package.json'), 5 | npmTasks = [ 6 | 'grunt-contrib-copy', 7 | 'grunt-contrib-uglify' 8 | ]; 9 | 10 | grunt.initConfig({ 11 | pkg: pkg, 12 | uglify: { 13 | main: { 14 | options: { 15 | sourceMap: true 16 | }, 17 | files: { 18 | 'traceur.min.js': 'traceur.js' 19 | } 20 | } 21 | }, 22 | copy: { 23 | main: { 24 | src: 'node_modules/traceur/bin/traceur.js', 25 | dest: './traceur.js' 26 | } 27 | } 28 | }); 29 | 30 | npmTasks.forEach(function(task) { 31 | grunt.loadNpmTasks(task); 32 | }); 33 | 34 | grunt.registerTask('default', ['copy', 'uglify']); 35 | }; 36 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node-es6/test-buffer-iterator.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | 'use strict'; 4 | var Buffer = require("../../../buffer@3.3.1").Buffer; 5 | if (process.env.OBJECT_IMPL) 6 | Buffer.TYPED_ARRAY_SUPPORT = false; 7 | var common = {}; 8 | var assert = require("assert"); 9 | var buffer = new Buffer([1, 2, 3, 4, 5]); 10 | var arr; 11 | var b; 12 | arr = []; 13 | for (b of buffer) 14 | arr.push(b); 15 | assert.deepEqual(arr, [1, 2, 3, 4, 5]); 16 | arr = []; 17 | for (b of buffer[Symbol.iterator]()) 18 | arr.push(b); 19 | assert.deepEqual(arr, [1, 2, 3, 4, 5]); 20 | arr = []; 21 | for (b of buffer.values()) 22 | arr.push(b); 23 | assert.deepEqual(arr, [1, 2, 3, 4, 5]); 24 | arr = []; 25 | for (b of buffer.keys()) 26 | arr.push(b); 27 | assert.deepEqual(arr, [0, 1, 2, 3, 4]); 28 | arr = []; 29 | for (var b of buffer.entries()) 30 | arr.push(b); 31 | assert.deepEqual(arr, [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5]]); 32 | })(require("process")); 33 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur-runtime@0.0.88/Gruntfile.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | "format global"; 3 | module.exports = function(grunt) { 4 | var pkg = grunt.file.readJSON('package.json'), 5 | npmTasks = [ 6 | 'grunt-contrib-copy', 7 | 'grunt-contrib-uglify' 8 | ]; 9 | 10 | grunt.initConfig({ 11 | pkg: pkg, 12 | uglify: { 13 | main: { 14 | options: { 15 | sourceMap: true 16 | }, 17 | files: { 18 | 'traceur-runtime.min.js': 'traceur-runtime.js' 19 | } 20 | } 21 | }, 22 | copy: { 23 | main: { 24 | src: 'node_modules/traceur/bin/traceur-runtime.js', 25 | dest: './traceur-runtime.js' 26 | } 27 | } 28 | }); 29 | 30 | npmTasks.forEach(function(task) { 31 | grunt.loadNpmTasks(task); 32 | }); 33 | 34 | grunt.registerTask('default', ['copy', 'uglify']); 35 | }; 36 | -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ieee754", 3 | "version": "1.1.6", 4 | "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object", 5 | "main": "index.js", 6 | "dependencies": {}, 7 | "devDependencies": { 8 | "standard": "^4.1.1", 9 | "tape": "^4.0.0", 10 | "zuul": "^3.0.0" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git://github.com/feross/ieee754.git" 15 | }, 16 | "keywords": [ 17 | "ieee754", 18 | "IEEE 754", 19 | "floating point", 20 | "buffer", 21 | "convert" 22 | ], 23 | "author": "Feross Aboukhadijeh (http://feross.org/)", 24 | "contributors": [ 25 | "Romain Beauxis " 26 | ], 27 | "scripts": { 28 | "test": "standard && npm run test-node && npm run test-browser", 29 | "test-browser": "zuul -- test/*.js", 30 | "test-browser-local": "zuul --local -- test/*.js", 31 | "test-node": "tape test/*.js" 32 | }, 33 | "license": "MIT" 34 | } 35 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Brian J. Brennan (http://bjb.io)", 3 | "name": "buffer-crc32", 4 | "description": "A pure javascript CRC32 algorithm that plays nice with binary data", 5 | "version": "0.2.5", 6 | "licenses": [ 7 | { 8 | "type": "MIT", 9 | "url": "https://github.com/brianloveswords/buffer-crc32/raw/master/LICENSE" 10 | } 11 | ], 12 | "contributors": [ 13 | { 14 | "name": "Vladimir Kuznetsov", 15 | "github": "mistakster" 16 | } 17 | ], 18 | "homepage": "https://github.com/brianloveswords/buffer-crc32", 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/brianloveswords/buffer-crc32.git" 22 | }, 23 | "main": "index.js", 24 | "scripts": { 25 | "test": "./node_modules/.bin/tap tests/*.test.js" 26 | }, 27 | "dependencies": {}, 28 | "devDependencies": { 29 | "tap": "~0.2.5" 30 | }, 31 | "optionalDependencies": {}, 32 | "engines": { 33 | "node": "*" 34 | }, 35 | "license": "MIT" 36 | } 37 | -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8/README.md: -------------------------------------------------------------------------------- 1 | base64-js 2 | ========= 3 | 4 | `base64-js` does basic base64 encoding/decoding in pure JS. 5 | 6 | [![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) 7 | 8 | [![testling badge](https://ci.testling.com/beatgammit/base64-js.png)](https://ci.testling.com/beatgammit/base64-js) 9 | 10 | Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. 11 | 12 | Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. 13 | 14 | ## install 15 | 16 | With [npm](https://npmjs.org) do: 17 | 18 | `npm install base64-js` 19 | 20 | ## methods 21 | 22 | `var base64 = require('base64-js')` 23 | 24 | `base64` has two exposed functions, `toByteArray` and `fromByteArray`, which both take a single argument. 25 | 26 | * `toByteArray` - Takes a base64 string and returns a byte array 27 | * `fromByteArray` - Takes a byte array and returns a base64 string 28 | 29 | ## license 30 | 31 | MIT -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur@0.0.88/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bower-traceur", 3 | "description": "A Bower package for the Google Traceur compiler.", 4 | "version": "0.0.88", 5 | "homepage": "http://ambition.com", 6 | "scripts": { 7 | "build": "npm install && grunt" 8 | }, 9 | "author": { 10 | "name": "Jeff McRiffey", 11 | "email": "jeff.mcriffey@ambition.com", 12 | "url": "https://github.com/jmcriffey" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/jmcriffey/bower-traceur.git" 17 | }, 18 | "devDependencies": { 19 | "traceur": "0.0.88", 20 | "grunt": "~0.4.2", 21 | "grunt-contrib-copy": "~0.5.0", 22 | "grunt-contrib-uglify": "~0.3.2", 23 | "grunt-cli": "^0.1.13" 24 | }, 25 | "jspm": { 26 | "format": "global", 27 | "shim": { 28 | "traceur": { 29 | "exports": "traceur" 30 | } 31 | } 32 | }, 33 | "format": "global", 34 | "shim": { 35 | "traceur": { 36 | "exports": "traceur" 37 | } 38 | }, 39 | "registry": "github", 40 | "main": "./traceur.js" 41 | } -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "is-array", 3 | "repository": { 4 | "type": "git", 5 | "url": "git://github.com/retrofox/is-array" 6 | }, 7 | "description": "Check if the given value is an Array", 8 | "version": "1.0.1", 9 | "keywords": [ 10 | "isArray", 11 | "es5", 12 | "array" 13 | ], 14 | "license": "MIT", 15 | "bugs": { 16 | "url": "https://github.com/retrofox/is-array/issues" 17 | }, 18 | "homepage": "https://github.com/retrofox/is-array", 19 | "_id": "is-array@1.0.1", 20 | "dist": { 21 | "shasum": "e9850cc2cc860c3bc0977e84ccf0dd464584279a", 22 | "tarball": "http://registry.npmjs.org/is-array/-/is-array-1.0.1.tgz" 23 | }, 24 | "_from": ".", 25 | "_npmVersion": "1.3.21", 26 | "_npmUser": { 27 | "name": "retrofox", 28 | "email": "rdsuarez@gmail.com" 29 | }, 30 | "maintainers": [ 31 | { 32 | "name": "retrofox", 33 | "email": "rdsuarez@gmail.com" 34 | } 35 | ], 36 | "format": "cjs", 37 | "ignore": [ 38 | "node_modules" 39 | ], 40 | "registry": "npm", 41 | "dependencies": {} 42 | } -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/sha224.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var inherits = require("inherits"); 4 | var Sha256 = require("./sha256"); 5 | var Hash = require("./hash"); 6 | var W = new Array(64); 7 | function Sha224() { 8 | this.init(); 9 | this._w = W; 10 | Hash.call(this, 64, 56); 11 | } 12 | inherits(Sha224, Sha256); 13 | Sha224.prototype.init = function() { 14 | this._a = 0xc1059ed8 | 0; 15 | this._b = 0x367cd507 | 0; 16 | this._c = 0x3070dd17 | 0; 17 | this._d = 0xf70e5939 | 0; 18 | this._e = 0xffc00b31 | 0; 19 | this._f = 0x68581511 | 0; 20 | this._g = 0x64f98fa7 | 0; 21 | this._h = 0xbefa4fa4 | 0; 22 | return this; 23 | }; 24 | Sha224.prototype._hash = function() { 25 | var H = new Buffer(28); 26 | H.writeInt32BE(this._a, 0); 27 | H.writeInt32BE(this._b, 4); 28 | H.writeInt32BE(this._c, 8); 29 | H.writeInt32BE(this._d, 12); 30 | H.writeInt32BE(this._e, 16); 31 | H.writeInt32BE(this._f, 20); 32 | H.writeInt32BE(this._g, 24); 33 | return H; 34 | }; 35 | module.exports = Sha224; 36 | })(require("buffer").Buffer); 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | The goal is to find a JavaScript hash implementation that is both light and fast. 2 | The JavaScript is considered to be run in the browser. 3 | The hash implementations are tested for speed by hashing the source code of JavaScript libraries. 4 | 5 | 6 | Tested are implementations for following Hash Functions 7 | - SHA-256 8 | - SHA-3 9 | - MD5 10 | - CRC32 11 | - blake2s 12 | 13 | 14 | Of all tested SHA-256 implementations, results with an Intel Celeron 2955U @ 1.4GHz suggests that forge is the fastest SHA-256 JavaScript implementation. 15 | Even though the original source code weights 284 KB, extracting the code related to SHA-256 reduces the size to 4.5 KB, see https://github.com/brillout/forge-sha256. 16 | 17 | 18 | ### Run the tests 19 | 20 | Go to http://brillout.github.io/test-javascript-hash-implementations/ and wait a bit. 21 | 22 | 23 | ### Other benchmarks 24 | 25 | - http://dominictarr.github.io/crypto-bench/, [source code](https://github.com/dominictarr/crypto-bench) 26 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur-runtime@0.0.88/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bower-traceur-runtime", 3 | "description": "A Bower package for the Google Traceur runtime.", 4 | "version": "0.0.88", 5 | "homepage": "http://ambition.com", 6 | "scripts": { 7 | "build": "npm install && grunt" 8 | }, 9 | "author": { 10 | "name": "Jeff McRiffey", 11 | "email": "jeff.mcriffey@ambition.com", 12 | "url": "https://github.com/jmcriffey" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/jmcriffey/bower-traceur-runtime.git" 17 | }, 18 | "devDependencies": { 19 | "traceur": "0.0.88", 20 | "grunt": "~0.4.2", 21 | "grunt-contrib-copy": "~0.5.0", 22 | "grunt-contrib-uglify": "~0.3.2", 23 | "grunt-cli": "^0.1.13" 24 | }, 25 | "jspm": { 26 | "format": "global", 27 | "shim": { 28 | "traceur-runtime": { 29 | "exports": "$traceurRuntime" 30 | } 31 | } 32 | }, 33 | "format": "global", 34 | "shim": { 35 | "traceur-runtime": { 36 | "exports": "$traceurRuntime" 37 | } 38 | }, 39 | "registry": "github", 40 | "main": "./traceur-runtime.js" 41 | } -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur@0.0.88/README.md: -------------------------------------------------------------------------------- 1 | # bower-traceur 2 | 3 | This repo is for distribution on `bower`. The source for this module is in the 4 | [main traceur repo](https://github.com/google/traceur-compiler/). 5 | Please file issues and pull requests against that repo. 6 | 7 | ## Install 8 | 9 | Install with `bower`: 10 | 11 | ```shell 12 | bower install traceur 13 | ``` 14 | 15 | Add a ` 19 | ``` 20 | 21 | ## License 22 | 23 | Copyright 2012 Traceur Authors. 24 | 25 | Licensed under the Apache License, Version 2.0 (the "License"); 26 | you may not use this file except in compliance with the License. 27 | You may obtain a copy of the License at 28 | 29 | http://www.apache.org/licenses/LICENSE-2.0 30 | 31 | Unless required by applicable law or agreed to in writing, software 32 | distributed under the License is distributed on an "AS IS" BASIS, 33 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 34 | See the License for the specific language governing permissions and 35 | limitations under the License. 36 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node/test-buffer-inspect.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | 'use strict'; 4 | var Buffer = require("../../../buffer@3.3.1").Buffer; 5 | if (process.env.OBJECT_IMPL) 6 | Buffer.TYPED_ARRAY_SUPPORT = false; 7 | var common = {}; 8 | var assert = require("assert"); 9 | var util = require("util"); 10 | var buffer = require("../../../buffer@3.3.1"); 11 | buffer.INSPECT_MAX_BYTES = 2; 12 | var b = new Buffer(4); 13 | b.fill('1234'); 14 | var s = new buffer.SlowBuffer(4); 15 | s.fill('1234'); 16 | var expected = ''; 17 | assert.strictEqual(util.inspect(b), expected); 18 | assert.strictEqual(util.inspect(s), expected); 19 | b = new Buffer(2); 20 | b.fill('12'); 21 | s = new buffer.SlowBuffer(2); 22 | s.fill('12'); 23 | expected = ''; 24 | assert.strictEqual(util.inspect(b), expected); 25 | assert.strictEqual(util.inspect(s), expected); 26 | buffer.INSPECT_MAX_BYTES = Infinity; 27 | assert.doesNotThrow(function() { 28 | assert.strictEqual(util.inspect(b), expected); 29 | assert.strictEqual(util.inspect(s), expected); 30 | }); 31 | })(require("process")); 32 | -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8/LICENSE.MIT: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2013 Brian J. Brennan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to use, 8 | copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the 9 | Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 16 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 17 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 18 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /jspm_packages/npm/process@0.10.1/README.md: -------------------------------------------------------------------------------- 1 | # process 2 | 3 | ```require('process');``` just like any other module. 4 | 5 | Works in node.js and browsers via the browser.js shim provided with the module. 6 | 7 | ## browser implementation 8 | 9 | The goal of this module is not to be a full-fledged alternative to the builtin process module. This module mostly exists to provide the nextTick functionality and nothing more. We keep this module lean because it will often be included by default by tools like browserify when it detects a module has used the `process` global. 10 | 11 | If you are looking to provide other process methods, I suggest you monkey patch them onto the process global in your app. A list of user created patches is below. 12 | 13 | * [hrtime](https://github.com/kumavis/browser-process-hrtime) 14 | 15 | ## package manager notes 16 | 17 | If you are writing a bundler to package modules for client side use, make sure you use the ```browser``` field hint in package.json. 18 | 19 | See https://gist.github.com/4339901 for details. 20 | 21 | The [browserify](https://github.com/substack/node-browserify) module will properly handle this field when bundling your files. 22 | 23 | 24 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Joyent, Inc. and other Node contributors. All rights reserved. 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to 4 | deal in the Software without restriction, including without limitation the 5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 6 | sell copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in 10 | all copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 18 | IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/static.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('Buffer.isEncoding', function(t) { 8 | t.equal(B.isEncoding('HEX'), true); 9 | t.equal(B.isEncoding('hex'), true); 10 | t.equal(B.isEncoding('bad'), false); 11 | t.end(); 12 | }); 13 | test('Buffer.isBuffer', function(t) { 14 | t.equal(B.isBuffer(new B('hey', 'utf8')), true); 15 | t.equal(B.isBuffer(new B([1, 2, 3], 'utf8')), true); 16 | t.equal(B.isBuffer('hey'), false); 17 | t.end(); 18 | }); 19 | test('Buffer.toArrayBuffer', function(t) { 20 | var data = [1, 2, 3, 4, 5, 6, 7, 8]; 21 | if (typeof Uint8Array !== 'undefined') { 22 | var result = new B(data).toArrayBuffer(); 23 | var expected = new Uint8Array(data).buffer; 24 | for (var i = 0; i < expected.byteLength; i++) { 25 | t.equal(result[i], expected[i]); 26 | } 27 | } else { 28 | t.pass('No toArrayBuffer() method provided in old browsers'); 29 | } 30 | t.end(); 31 | }); 32 | })(require("process")); 33 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2014 sha.js contributors 2 | 3 | Permission is hereby granted, free of charge, 4 | to any person obtaining a copy of this software and 5 | associated documentation files (the "Software"), to 6 | deal in the Software without restriction, including 7 | without limitation the rights to use, copy, modify, 8 | merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom 10 | the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 20 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /jspm_packages/github/jmcriffey/bower-traceur-runtime@0.0.88/README.md: -------------------------------------------------------------------------------- 1 | # bower-traceur-runtime 2 | 3 | This repo is for distribution on `bower`. The source for this module is in the 4 | [main traceur repo](https://github.com/google/traceur-compiler/). 5 | Please file issues and pull requests against that repo. 6 | 7 | ## Install 8 | 9 | Install with `bower`: 10 | 11 | ```shell 12 | bower install traceur-runtime 13 | ``` 14 | 15 | Add a ` 19 | ``` 20 | 21 | ## License 22 | 23 | Copyright 2012 Traceur Authors. 24 | 25 | Licensed under the Apache License, Version 2.0 (the "License"); 26 | you may not use this file except in compliance with the License. 27 | You may obtain a copy of the License at 28 | 29 | http://www.apache.org/licenses/LICENSE-2.0 30 | 31 | Unless required by applicable law or agreed to in writing, software 32 | distributed under the License is distributed on an "AS IS" BASIS, 33 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 34 | See the License for the specific language governing permissions and 35 | limitations under the License. 36 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Feross Aboukhadijeh, and other contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /jspm_packages/npm/process@0.10.1/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2013 Roman Shtylman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/slice.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('modifying buffer created by .slice() modifies original memory', function(t) { 8 | if (!B.TYPED_ARRAY_SUPPORT) 9 | return t.end(); 10 | var buf1 = new B(26); 11 | for (var i = 0; i < 26; i++) { 12 | buf1[i] = i + 97; 13 | } 14 | var buf2 = buf1.slice(0, 3); 15 | t.equal(buf2.toString('ascii', 0, buf2.length), 'abc'); 16 | buf2[0] = '!'.charCodeAt(0); 17 | t.equal(buf1.toString('ascii', 0, buf2.length), '!bc'); 18 | t.end(); 19 | }); 20 | test('modifying parent buffer modifies .slice() buffer\'s memory', function(t) { 21 | if (!B.TYPED_ARRAY_SUPPORT) 22 | return t.end(); 23 | var buf1 = new B(26); 24 | for (var i = 0; i < 26; i++) { 25 | buf1[i] = i + 97; 26 | } 27 | var buf2 = buf1.slice(0, 3); 28 | t.equal(buf2.toString('ascii', 0, buf2.length), 'abc'); 29 | buf1[0] = '!'.charCodeAt(0); 30 | t.equal(buf2.toString('ascii', 0, buf2.length), '!bc'); 31 | t.end(); 32 | }); 33 | })(require("process")); 34 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/bin.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var createHash = require("./browserify"); 4 | var argv = process.argv.slice(2); 5 | function pipe(algorithm, s) { 6 | var start = Date.now(); 7 | var hash = createHash(algorithm || 'sha1'); 8 | s.on('data', function(data) { 9 | hash.update(data); 10 | }); 11 | s.on('end', function() { 12 | if (process.env.DEBUG) { 13 | return console.log(hash.digest('hex'), Date.now() - start); 14 | } 15 | console.log(hash.digest('hex')); 16 | }); 17 | } 18 | function usage() { 19 | console.error('sha.js [algorithm=sha1] [filename] # hash filename with algorithm'); 20 | console.error('input | sha.js [algorithm=sha1] # hash stdin with algorithm'); 21 | console.error('sha.js --help # display this message'); 22 | } 23 | if (!process.stdin.isTTY) { 24 | pipe(argv[0], process.stdin); 25 | } else if (argv.length) { 26 | if (/--help|-h/.test(argv[0])) { 27 | usage(); 28 | } else { 29 | var filename = argv.pop(); 30 | var algorithm = argv.pop(); 31 | pipe(algorithm, require("fs").createReadStream(filename)); 32 | } 33 | } else { 34 | usage(); 35 | } 36 | })(require("process")); 37 | -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8/test/convert.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | var test = require("tape"), 3 | b64 = require("../lib/b64"), 4 | checks = ['a', 'aa', 'aaa', 'hi', 'hi!', 'hi!!', 'sup', 'sup?', 'sup?!']; 5 | test('convert to base64 and back', function(t) { 6 | t.plan(checks.length); 7 | for (var i = 0; i < checks.length; i++) { 8 | var check = checks[i], 9 | b64Str, 10 | arr, 11 | str; 12 | b64Str = b64.fromByteArray(map(check, function(char) { 13 | return char.charCodeAt(0); 14 | })); 15 | arr = b64.toByteArray(b64Str); 16 | str = map(arr, function(byte) { 17 | return String.fromCharCode(byte); 18 | }).join(''); 19 | t.equal(check, str, 'Checked ' + check); 20 | } 21 | }); 22 | function map(arr, callback) { 23 | var res = [], 24 | kValue, 25 | mappedValue; 26 | for (var k = 0, 27 | len = arr.length; k < len; k++) { 28 | if ((typeof arr === 'string' && !!arr.charAt(k))) { 29 | kValue = arr.charAt(k); 30 | mappedValue = callback(kValue, k, arr); 31 | res[k] = mappedValue; 32 | } else if (typeof arr !== 'string' && k in arr) { 33 | kValue = arr[k]; 34 | mappedValue = callback(kValue, k, arr); 35 | res[k] = mappedValue; 36 | } 37 | } 38 | return res; 39 | } 40 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/test/node/log.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var assert = require("assert"); 4 | var util = require("../../util"); 5 | assert.ok(process.stdout.writable); 6 | assert.ok(process.stderr.writable); 7 | var stdout_write = global.process.stdout.write; 8 | var strings = []; 9 | global.process.stdout.write = function(string) { 10 | strings.push(string); 11 | }; 12 | console._stderr = process.stdout; 13 | var tests = [{ 14 | input: 'foo', 15 | output: 'foo' 16 | }, { 17 | input: undefined, 18 | output: 'undefined' 19 | }, { 20 | input: null, 21 | output: 'null' 22 | }, { 23 | input: false, 24 | output: 'false' 25 | }, { 26 | input: 42, 27 | output: '42' 28 | }, { 29 | input: function() {}, 30 | output: '[Function]' 31 | }, { 32 | input: parseInt('not a number', 10), 33 | output: 'NaN' 34 | }, { 35 | input: {answer: 42}, 36 | output: '{ answer: 42 }' 37 | }, { 38 | input: [1, 2, 3], 39 | output: '[ 1, 2, 3 ]' 40 | }]; 41 | tests.forEach(function(test) { 42 | util.log(test.input); 43 | var result = strings.shift().trim(), 44 | re = (/[0-9]{1,2} [A-Z][a-z]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} - (.+)$/), 45 | match = re.exec(result); 46 | assert.ok(match); 47 | assert.equal(match[1], test.output); 48 | }); 49 | global.process.stdout.write = stdout_write; 50 | })(require("process")); 51 | -------------------------------------------------------------------------------- /jspm_packages/npm/inherits@2.0.1/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "inherits", 3 | "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", 4 | "version": "2.0.1", 5 | "keywords": [ 6 | "inheritance", 7 | "class", 8 | "klass", 9 | "oop", 10 | "object-oriented", 11 | "inherits", 12 | "browser", 13 | "browserify" 14 | ], 15 | "main": "./inherits_browser.js", 16 | "browser": "./inherits_browser.js", 17 | "repository": { 18 | "type": "git", 19 | "url": "git://github.com/isaacs/inherits" 20 | }, 21 | "license": "ISC", 22 | "scripts": { 23 | "test": "node test" 24 | }, 25 | "bugs": { 26 | "url": "https://github.com/isaacs/inherits/issues" 27 | }, 28 | "_id": "inherits@2.0.1", 29 | "dist": { 30 | "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", 31 | "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" 32 | }, 33 | "_from": ".", 34 | "_npmVersion": "1.3.8", 35 | "_npmUser": { 36 | "name": "isaacs", 37 | "email": "i@izs.me" 38 | }, 39 | "maintainers": [ 40 | { 41 | "name": "isaacs", 42 | "email": "i@izs.me" 43 | } 44 | ], 45 | "jspm": { 46 | "ignore": [ 47 | "test.js", 48 | "node_modules" 49 | ] 50 | }, 51 | "ignore": [ 52 | "test.js", 53 | "node_modules" 54 | ], 55 | "format": "cjs", 56 | "registry": "npm", 57 | "dependencies": { 58 | "util": "github:jspm/nodelibs-util@^0.1.0" 59 | } 60 | } -------------------------------------------------------------------------------- /jspm_packages/npm/process@0.10.1/browser.js: -------------------------------------------------------------------------------- 1 | // shim for using process in browser 2 | 3 | var process = module.exports = {}; 4 | var queue = []; 5 | var draining = false; 6 | 7 | function drainQueue() { 8 | if (draining) { 9 | return; 10 | } 11 | draining = true; 12 | var currentQueue; 13 | var len = queue.length; 14 | while(len) { 15 | currentQueue = queue; 16 | queue = []; 17 | var i = -1; 18 | while (++i < len) { 19 | currentQueue[i](); 20 | } 21 | len = queue.length; 22 | } 23 | draining = false; 24 | } 25 | process.nextTick = function (fun) { 26 | queue.push(fun); 27 | if (!draining) { 28 | setTimeout(drainQueue, 0); 29 | } 30 | }; 31 | 32 | process.title = 'browser'; 33 | process.browser = true; 34 | process.env = {}; 35 | process.argv = []; 36 | process.version = ''; // empty string to avoid regexp issues 37 | process.versions = {}; 38 | 39 | function noop() {} 40 | 41 | process.on = noop; 42 | process.addListener = noop; 43 | process.once = noop; 44 | process.off = noop; 45 | process.removeListener = noop; 46 | process.removeAllListeners = noop; 47 | process.emit = noop; 48 | 49 | process.binding = function (name) { 50 | throw new Error('process.binding is not supported'); 51 | }; 52 | 53 | // TODO(shtylman) 54 | process.cwd = function () { return '/' }; 55 | process.chdir = function (dir) { 56 | throw new Error('process.chdir is not supported'); 57 | }; 58 | process.umask = function() { return 0; }; 59 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Joyent", 4 | "url": "http://www.joyent.com" 5 | }, 6 | "name": "util", 7 | "description": "Node.JS util module", 8 | "keywords": [ 9 | "util" 10 | ], 11 | "version": "0.10.3", 12 | "homepage": "https://github.com/defunctzombie/node-util", 13 | "repository": { 14 | "type": "git", 15 | "url": "git://github.com/defunctzombie/node-util" 16 | }, 17 | "main": "./util.js", 18 | "scripts": { 19 | "test": "node test/node/*.js && zuul test/browser/*.js" 20 | }, 21 | "license": "MIT", 22 | "devDependencies": { 23 | "zuul": "~1.0.9" 24 | }, 25 | "browser": { 26 | "./support/isBuffer.js": "./support/isBufferBrowser.js" 27 | }, 28 | "bugs": { 29 | "url": "https://github.com/defunctzombie/node-util/issues" 30 | }, 31 | "_id": "util@0.10.3", 32 | "dist": { 33 | "shasum": "7afb1afe50805246489e3db7fe0ed379336ac0f9", 34 | "tarball": "http://registry.npmjs.org/util/-/util-0.10.3.tgz" 35 | }, 36 | "_from": ".", 37 | "_npmVersion": "1.3.24", 38 | "_npmUser": { 39 | "name": "shtylman", 40 | "email": "shtylman@gmail.com" 41 | }, 42 | "maintainers": [ 43 | { 44 | "name": "shtylman", 45 | "email": "shtylman@gmail.com" 46 | } 47 | ], 48 | "format": "cjs", 49 | "ignore": [ 50 | "node_modules" 51 | ], 52 | "map": {}, 53 | "registry": "npm", 54 | "dependencies": { 55 | "inherits": "inherits@2.0.1", 56 | "process": "github:jspm/nodelibs-process@^0.1.0" 57 | } 58 | } -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | "defaultJSExtensions": true, 3 | "transpiler": "traceur", 4 | "paths": { 5 | "github:*": "jspm_packages/github/*", 6 | "npm:*": "jspm_packages/npm/*" 7 | } 8 | }); 9 | 10 | System.config({ 11 | "map": { 12 | "buffer-crc32": "npm:buffer-crc32@0.2.5", 13 | "sha.js": "npm:sha.js@2.4.2", 14 | "traceur": "github:jmcriffey/bower-traceur@0.0.88", 15 | "traceur-runtime": "github:jmcriffey/bower-traceur-runtime@0.0.88", 16 | "github:jspm/nodelibs-buffer@0.1.0": { 17 | "buffer": "npm:buffer@3.3.1" 18 | }, 19 | "github:jspm/nodelibs-process@0.1.1": { 20 | "process": "npm:process@0.10.1" 21 | }, 22 | "github:jspm/nodelibs-util@0.1.0": { 23 | "util": "npm:util@0.10.3" 24 | }, 25 | "npm:buffer-crc32@0.2.5": { 26 | "buffer": "github:jspm/nodelibs-buffer@0.1.0" 27 | }, 28 | "npm:buffer@3.3.1": { 29 | "base64-js": "npm:base64-js@0.0.8", 30 | "ieee754": "npm:ieee754@1.1.6", 31 | "is-array": "npm:is-array@1.0.1" 32 | }, 33 | "npm:inherits@2.0.1": { 34 | "util": "github:jspm/nodelibs-util@0.1.0" 35 | }, 36 | "npm:sha.js@2.4.2": { 37 | "buffer": "github:jspm/nodelibs-buffer@0.1.0", 38 | "fs": "github:jspm/nodelibs-fs@0.1.2", 39 | "inherits": "npm:inherits@2.0.1", 40 | "process": "github:jspm/nodelibs-process@0.1.1" 41 | }, 42 | "npm:util@0.10.3": { 43 | "inherits": "npm:inherits@2.0.1", 44 | "process": "github:jspm/nodelibs-process@0.1.1" 45 | } 46 | } 47 | }); 48 | 49 | -------------------------------------------------------------------------------- /jspm_packages/npm/process@0.10.1/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Roman Shtylman", 4 | "email": "shtylman@gmail.com" 5 | }, 6 | "name": "process", 7 | "description": "process information for node.js and browsers", 8 | "keywords": [ 9 | "process" 10 | ], 11 | "version": "0.10.1", 12 | "repository": { 13 | "type": "git", 14 | "url": "git://github.com/shtylman/node-process.git" 15 | }, 16 | "browser": "./browser.js", 17 | "main": "./browser.js", 18 | "engines": { 19 | "node": ">= 0.6.0" 20 | }, 21 | "gitHead": "b723f82028b12e94abfe732e9f432a3fb2b5cece", 22 | "bugs": { 23 | "url": "https://github.com/shtylman/node-process/issues" 24 | }, 25 | "homepage": "https://github.com/shtylman/node-process", 26 | "_id": "process@0.10.1", 27 | "scripts": {}, 28 | "_shasum": "842457cc51cfed72dc775afeeafb8c6034372725", 29 | "_from": ".", 30 | "_npmVersion": "2.6.1", 31 | "_nodeVersion": "0.10.35", 32 | "_npmUser": { 33 | "name": "shtylman", 34 | "email": "shtylman@gmail.com" 35 | }, 36 | "maintainers": [ 37 | { 38 | "name": "coolaj86", 39 | "email": "coolaj86@gmail.com" 40 | }, 41 | { 42 | "name": "shtylman", 43 | "email": "shtylman@gmail.com" 44 | } 45 | ], 46 | "dist": { 47 | "shasum": "842457cc51cfed72dc775afeeafb8c6034372725", 48 | "tarball": "http://registry.npmjs.org/process/-/process-0.10.1.tgz" 49 | }, 50 | "format": "cjs", 51 | "ignore": [ 52 | "node_modules" 53 | ], 54 | "registry": "npm", 55 | "dependencies": {} 56 | } -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/README.md: -------------------------------------------------------------------------------- 1 | # sha.js 2 | 3 | Streamable SHA hashes in pure javascript. 4 | 5 | [![build status](https://secure.travis-ci.org/dominictarr/sha.js.png)](http://travis-ci.org/dominictarr/sha.js) 6 | 7 | [![testling badge](https://ci.testling.com/dominictarr/sha.js.png)](https://ci.testling.com/dominictarr/sha.js) 8 | 9 | ## Example 10 | 11 | ``` js 12 | var createHash = require('sha.js') 13 | 14 | var sha256 = createHash('sha256') 15 | var sha512 = createHash('sha512') 16 | 17 | var h = sha256.update('abc', 'utf8').digest('hex') 18 | console.log(h) //ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad 19 | 20 | //LEGACY, do not use in new systems: 21 | var sha0 = createHash('sha') 22 | var sha1 = createHash('sha1') 23 | 24 | 25 | ``` 26 | 27 | ## supported hashes 28 | 29 | sha.js currently implements: 30 | 31 | 32 | * sha256 33 | * sha512 34 | * sha1 (legacy, no not use in new systems) 35 | * sha (legacy, no not use in new systems) 36 | 37 | ## Note 38 | 39 | Note, this doesn't actually implement a stream, but wrapping this in a stream is trivial. 40 | but is does update incrementally, so you can hash things larger than ram, and also, since it reuses 41 | the typedarrays, it uses a constant amount of memory (except when using base64 or utf8 encoding, 42 | see code comments) 43 | 44 | 45 | ## Acknowledgements 46 | 47 | This work is derived from Paul Johnston's ["A JavaScript implementation of the Secure Hash Algorithm"] 48 | (http://pajhome.org.uk/crypt/md5/sha1.html) 49 | 50 | 51 | 52 | ## License 53 | 54 | MIT 55 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/sha384.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var inherits = require("inherits"); 4 | var SHA512 = require("./sha512"); 5 | var Hash = require("./hash"); 6 | var W = new Array(160); 7 | function Sha384() { 8 | this.init(); 9 | this._w = W; 10 | Hash.call(this, 128, 112); 11 | } 12 | inherits(Sha384, SHA512); 13 | Sha384.prototype.init = function() { 14 | this._a = 0xcbbb9d5d | 0; 15 | this._b = 0x629a292a | 0; 16 | this._c = 0x9159015a | 0; 17 | this._d = 0x152fecd8 | 0; 18 | this._e = 0x67332667 | 0; 19 | this._f = 0x8eb44a87 | 0; 20 | this._g = 0xdb0c2e0d | 0; 21 | this._h = 0x47b5481d | 0; 22 | this._al = 0xc1059ed8 | 0; 23 | this._bl = 0x367cd507 | 0; 24 | this._cl = 0x3070dd17 | 0; 25 | this._dl = 0xf70e5939 | 0; 26 | this._el = 0xffc00b31 | 0; 27 | this._fl = 0x68581511 | 0; 28 | this._gl = 0x64f98fa7 | 0; 29 | this._hl = 0xbefa4fa4 | 0; 30 | return this; 31 | }; 32 | Sha384.prototype._hash = function() { 33 | var H = new Buffer(48); 34 | function writeInt64BE(h, l, offset) { 35 | H.writeInt32BE(h, offset); 36 | H.writeInt32BE(l, offset + 4); 37 | } 38 | writeInt64BE(this._a, this._al, 0); 39 | writeInt64BE(this._b, this._bl, 8); 40 | writeInt64BE(this._c, this._cl, 16); 41 | writeInt64BE(this._d, this._dl, 24); 42 | writeInt64BE(this._e, this._el, 32); 43 | writeInt64BE(this._f, this._fl, 40); 44 | return H; 45 | }; 46 | module.exports = Sha384; 47 | })(require("buffer").Buffer); 48 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/compare.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('buffer.compare', function(t) { 8 | var b = new B(1).fill('a'); 9 | var c = new B(1).fill('c'); 10 | var d = new B(2).fill('aa'); 11 | t.equal(b.compare(c), -1); 12 | t.equal(c.compare(d), 1); 13 | t.equal(d.compare(b), 1); 14 | t.equal(b.compare(d), -1); 15 | t.equal(B.compare(b, c), -1); 16 | t.equal(B.compare(c, d), 1); 17 | t.equal(B.compare(d, b), 1); 18 | t.equal(B.compare(b, d), -1); 19 | t.end(); 20 | }); 21 | test('buffer.compare argument validation', function(t) { 22 | t.throws(function() { 23 | var b = new B(1); 24 | B.compare(b, 'abc'); 25 | }); 26 | t.throws(function() { 27 | var b = new B(1); 28 | B.compare('abc', b); 29 | }); 30 | t.throws(function() { 31 | var b = new B(1); 32 | b.compare('abc'); 33 | }); 34 | t.end(); 35 | }); 36 | test('buffer.equals', function(t) { 37 | var b = new B(5).fill('abcdf'); 38 | var c = new B(5).fill('abcdf'); 39 | var d = new B(5).fill('abcde'); 40 | var e = new B(6).fill('abcdef'); 41 | t.ok(b.equals(c)); 42 | t.ok(!c.equals(d)); 43 | t.ok(!d.equals(e)); 44 | t.end(); 45 | }); 46 | test('buffer.equals argument validation', function(t) { 47 | t.throws(function() { 48 | var b = new B(1); 49 | b.equals('abc'); 50 | }); 51 | t.end(); 52 | }); 53 | })(require("process")); 54 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/base64.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('base64: ignore whitespace', function(t) { 8 | var text = '\n YW9ldQ== '; 9 | var buf = new B(text, 'base64'); 10 | t.equal(buf.toString(), 'aoeu'); 11 | t.end(); 12 | }); 13 | test('base64: strings without padding', function(t) { 14 | t.equal((new B('YW9ldQ', 'base64').toString()), 'aoeu'); 15 | t.end(); 16 | }); 17 | test('base64: newline in utf8 -- should not be an issue', function(t) { 18 | t.equal(new B('LS0tCnRpdGxlOiBUaHJlZSBkYXNoZXMgbWFya3MgdGhlIHNwb3QKdGFnczoK', 'base64').toString('utf8'), '---\ntitle: Three dashes marks the spot\ntags:\n'); 19 | t.end(); 20 | }); 21 | test('base64: newline in base64 -- should get stripped', function(t) { 22 | t.equal(new B('LS0tCnRpdGxlOiBUaHJlZSBkYXNoZXMgbWFya3MgdGhlIHNwb3QKdGFnczoK\nICAtIHlhbWwKICAtIGZyb250LW1hdHRlcgogIC0gZGFzaGVzCmV4cGFuZWQt', 'base64').toString('utf8'), '---\ntitle: Three dashes marks the spot\ntags:\n - yaml\n - front-matter\n - dashes\nexpaned-'); 23 | t.end(); 24 | }); 25 | test('base64: tab characters in base64 - should get stripped', function(t) { 26 | t.equal(new B('LS0tCnRpdGxlOiBUaHJlZSBkYXNoZXMgbWFya3MgdGhlIHNwb3QKdGFnczoK\t\t\t\tICAtIHlhbWwKICAtIGZyb250LW1hdHRlcgogIC0gZGFzaGVzCmV4cGFuZWQt', 'base64').toString('utf8'), '---\ntitle: Three dashes marks the spot\ntags:\n - yaml\n - front-matter\n - dashes\nexpaned-'); 27 | t.end(); 28 | }); 29 | })(require("process")); 30 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5/README.md: -------------------------------------------------------------------------------- 1 | # buffer-crc32 2 | 3 | [![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32) 4 | 5 | crc32 that works with binary data and fancy character sets, outputs 6 | buffer, signed or unsigned data and has tests. 7 | 8 | Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix 9 | 10 | # install 11 | ``` 12 | npm install buffer-crc32 13 | ``` 14 | 15 | # example 16 | ```js 17 | var crc32 = require('buffer-crc32'); 18 | // works with buffers 19 | var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) 20 | crc32(buf) // -> 21 | 22 | // has convenience methods for getting signed or unsigned ints 23 | crc32.signed(buf) // -> -1805997238 24 | crc32.unsigned(buf) // -> 2488970058 25 | 26 | // will cast to buffer if given a string, so you can 27 | // directly use foreign characters safely 28 | crc32('自動販売機') // -> 29 | 30 | // and works in append mode too 31 | var partialCrc = crc32('hey'); 32 | var partialCrc = crc32(' ', partialCrc); 33 | var partialCrc = crc32('sup', partialCrc); 34 | var partialCrc = crc32(' ', partialCrc); 35 | var finalCrc = crc32('bros', partialCrc); // -> 36 | ``` 37 | 38 | # tests 39 | This was tested against the output of zlib's crc32 method. You can run 40 | the tests with`npm test` (requires tap) 41 | 42 | # see also 43 | https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also 44 | supports buffer inputs and return unsigned ints (thanks @tjholowaychuk). 45 | 46 | # license 47 | MIT/X11 48 | -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6/README.md: -------------------------------------------------------------------------------- 1 | # ieee754 [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] 2 | 3 | [![saucelabs][saucelabs-image]][saucelabs-url] 4 | 5 | [travis-image]: https://img.shields.io/travis/feross/ieee754.svg?style=flat 6 | [travis-url]: https://travis-ci.org/feross/ieee754 7 | [npm-image]: https://img.shields.io/npm/v/ieee754.svg?style=flat 8 | [npm-url]: https://npmjs.org/package/ieee754 9 | [downloads-image]: https://img.shields.io/npm/dm/ieee754.svg?style=flat 10 | [saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg 11 | [saucelabs-url]: https://saucelabs.com/u/ieee754 12 | 13 | ### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object. 14 | 15 | ## install 16 | 17 | ``` 18 | npm install ieee754 19 | ``` 20 | 21 | ## methods 22 | 23 | `var ieee754 = require('ieee754')` 24 | 25 | The `ieee754` object has the following functions: 26 | 27 | ``` 28 | ieee754.read = function (buffer, offset, isLE, mLen, nBytes) 29 | ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) 30 | ``` 31 | 32 | The arguments mean the following: 33 | 34 | - buffer = the buffer 35 | - offset = offset into the buffer 36 | - value = value to set (only for `write`) 37 | - isLe = is little endian? 38 | - mLen = mantissa length 39 | - nBytes = number of bytes 40 | 41 | ## what is ieee754? 42 | 43 | The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point). 44 | 45 | ## mit license 46 | 47 | Copyright (C) 2013 [Feross Aboukhadijeh](http://feross.org) & Romain Beauxis. 48 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/hash.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | function Hash(blockSize, finalSize) { 4 | this._block = new Buffer(blockSize); 5 | this._finalSize = finalSize; 6 | this._blockSize = blockSize; 7 | this._len = 0; 8 | this._s = 0; 9 | } 10 | Hash.prototype.update = function(data, enc) { 11 | if (typeof data === 'string') { 12 | enc = enc || 'utf8'; 13 | data = new Buffer(data, enc); 14 | } 15 | var l = this._len += data.length; 16 | var s = this._s || 0; 17 | var f = 0; 18 | var buffer = this._block; 19 | while (s < l) { 20 | var t = Math.min(data.length, f + this._blockSize - (s % this._blockSize)); 21 | var ch = (t - f); 22 | for (var i = 0; i < ch; i++) { 23 | buffer[(s % this._blockSize) + i] = data[i + f]; 24 | } 25 | s += ch; 26 | f += ch; 27 | if ((s % this._blockSize) === 0) { 28 | this._update(buffer); 29 | } 30 | } 31 | this._s = s; 32 | return this; 33 | }; 34 | Hash.prototype.digest = function(enc) { 35 | var l = this._len * 8; 36 | this._block[this._len % this._blockSize] = 0x80; 37 | this._block.fill(0, this._len % this._blockSize + 1); 38 | if (l % (this._blockSize * 8) >= this._finalSize * 8) { 39 | this._update(this._block); 40 | this._block.fill(0); 41 | } 42 | this._block.writeInt32BE(l, this._blockSize - 4); 43 | var hash = this._update(this._block) || this._hash(); 44 | return enc ? hash.toString(enc) : hash; 45 | }; 46 | Hash.prototype._update = function() { 47 | throw new Error('_update must be implemented by subclass'); 48 | }; 49 | module.exports = Hash; 50 | })(require("buffer").Buffer); 51 | -------------------------------------------------------------------------------- /jspm_packages/npm/inherits@2.0.1/README.md: -------------------------------------------------------------------------------- 1 | Browser-friendly inheritance fully compatible with standard node.js 2 | [inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). 3 | 4 | This package exports standard `inherits` from node.js `util` module in 5 | node environment, but also provides alternative browser-friendly 6 | implementation through [browser 7 | field](https://gist.github.com/shtylman/4339901). Alternative 8 | implementation is a literal copy of standard one located in standalone 9 | module to avoid requiring of `util`. It also has a shim for old 10 | browsers with no `Object.create` support. 11 | 12 | While keeping you sure you are using standard `inherits` 13 | implementation in node.js environment, it allows bundlers such as 14 | [browserify](https://github.com/substack/node-browserify) to not 15 | include full `util` package to your client code if all you need is 16 | just `inherits` function. It worth, because browser shim for `util` 17 | package is large and `inherits` is often the single function you need 18 | from it. 19 | 20 | It's recommended to use this package instead of 21 | `require('util').inherits` for any code that has chances to be used 22 | not only in node.js but in browser too. 23 | 24 | ## usage 25 | 26 | ```js 27 | var inherits = require('inherits'); 28 | // then use exactly as the standard one 29 | ``` 30 | 31 | ## note on version ~1.0 32 | 33 | Version ~1.0 had completely different motivation and is not compatible 34 | neither with 2.0 nor with standard node.js `inherits`. 35 | 36 | If you are using version ~1.0 and planning to switch to ~2.0, be 37 | careful: 38 | 39 | * new version uses `super_` instead of `super` for referencing 40 | superclass 41 | * new version overwrites current prototype while old one preserves any 42 | existing fields on it 43 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/test/node/debug.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var assert = require("assert"); 4 | var util = require("../../util"); 5 | if (process.argv[2] === 'child') 6 | child(); 7 | else 8 | parent(); 9 | function parent() { 10 | test('foo,tud,bar', true); 11 | test('foo,tud', true); 12 | test('tud,bar', true); 13 | test('tud', true); 14 | test('foo,bar', false); 15 | test('', false); 16 | } 17 | function test(environ, shouldWrite) { 18 | var expectErr = ''; 19 | if (shouldWrite) { 20 | expectErr = 'TUD %PID%: this { is: \'a\' } /debugging/\n' + 'TUD %PID%: number=1234 string=asdf obj={"foo":"bar"}\n'; 21 | } 22 | var expectOut = 'ok\n'; 23 | var didTest = false; 24 | var spawn = require("child_process").spawn; 25 | var child = spawn(process.execPath, [__filename, 'child'], {env: {NODE_DEBUG: environ}}); 26 | expectErr = expectErr.split('%PID%').join(child.pid); 27 | var err = ''; 28 | child.stderr.setEncoding('utf8'); 29 | child.stderr.on('data', function(c) { 30 | err += c; 31 | }); 32 | var out = ''; 33 | child.stdout.setEncoding('utf8'); 34 | child.stdout.on('data', function(c) { 35 | out += c; 36 | }); 37 | child.on('close', function(c) { 38 | assert(!c); 39 | assert.equal(err, expectErr); 40 | assert.equal(out, expectOut); 41 | didTest = true; 42 | console.log('ok %j %j', environ, shouldWrite); 43 | }); 44 | process.on('exit', function() { 45 | assert(didTest); 46 | }); 47 | } 48 | function child() { 49 | var debug = util.debuglog('tud'); 50 | debug('this', {is: 'a'}, /debugging/); 51 | debug('number=%d string=%s obj=%j', 1234, 'asdf', {foo: 'bar'}); 52 | console.log('ok'); 53 | } 54 | })(require("process")); 55 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/basic.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('buf.constructor is Buffer', function(t) { 8 | var buf = new B([1, 2]); 9 | t.strictEqual(buf.constructor, B); 10 | t.end(); 11 | }); 12 | test('convert to Uint8Array in modern browsers', function(t) { 13 | if (B.TYPED_ARRAY_SUPPORT) { 14 | var buf = new B([1, 2]); 15 | var uint8array = new Uint8Array(buf.buffer); 16 | t.ok(uint8array instanceof Uint8Array); 17 | t.equal(uint8array[0], 1); 18 | t.equal(uint8array[1], 2); 19 | } else { 20 | t.pass('object impl: skipping test'); 21 | } 22 | t.end(); 23 | }); 24 | test('indexes from a string', function(t) { 25 | var buf = new B('abc'); 26 | t.equal(buf[0], 97); 27 | t.equal(buf[1], 98); 28 | t.equal(buf[2], 99); 29 | t.end(); 30 | }); 31 | test('indexes from an array', function(t) { 32 | var buf = new B([97, 98, 99]); 33 | t.equal(buf[0], 97); 34 | t.equal(buf[1], 98); 35 | t.equal(buf[2], 99); 36 | t.end(); 37 | }); 38 | test('setting index value should modify buffer contents', function(t) { 39 | var buf = new B([97, 98, 99]); 40 | t.equal(buf[2], 99); 41 | t.equal(buf.toString(), 'abc'); 42 | buf[2] += 10; 43 | t.equal(buf[2], 109); 44 | t.equal(buf.toString(), 'abm'); 45 | t.end(); 46 | }); 47 | test('storing negative number should cast to unsigned', function(t) { 48 | var buf = new B(1); 49 | if (B.TYPED_ARRAY_SUPPORT) { 50 | buf[0] = -3; 51 | t.equal(buf[0], 253); 52 | } 53 | buf = new B(1); 54 | buf.writeInt8(-3, 0); 55 | t.equal(buf[0], 253); 56 | t.end(); 57 | }); 58 | })(require("process")); 59 | -------------------------------------------------------------------------------- /jspm_packages/npm/is-array@1.0.1/test/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | isArray Tests 5 | 6 | 14 | 15 | 16 |
    17 | 18 | 45 | 46 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/test/vectors.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer, process) { 3 | var tape = require("tape"); 4 | var vectors = require("hash-test-vectors"); 5 | var Buffer = require("buffer").Buffer; 6 | var hexpp = require("../hexpp"); 7 | var createHash = require("../index"); 8 | function makeTest(alg, i, verbose) { 9 | var v = vectors[i]; 10 | tape(alg + ': NIST vector ' + i, function(t) { 11 | if (verbose) { 12 | console.log(v); 13 | console.log('VECTOR', i); 14 | console.log('INPUT', v.input); 15 | console.log(hexpp(new Buffer(v.input, 'base64'))); 16 | console.log(new Buffer(v.input, 'base64').toString('hex')); 17 | } 18 | var buf = new Buffer(v.input, 'base64'); 19 | t.equal(createHash(alg).update(buf).digest('hex'), v[alg]); 20 | i = ~~(buf.length / 2); 21 | var buf1 = buf.slice(0, i); 22 | var buf2 = buf.slice(i, buf.length); 23 | console.log(buf1.length, buf2.length, buf.length); 24 | console.log(createHash(alg)._block.length); 25 | t.equal(createHash(alg).update(buf1).update(buf2).digest('hex'), v[alg]); 26 | var j, 27 | buf3; 28 | i = ~~(buf.length / 3); 29 | j = ~~(buf.length * 2 / 3); 30 | buf1 = buf.slice(0, i); 31 | buf2 = buf.slice(i, j); 32 | buf3 = buf.slice(j, buf.length); 33 | t.equal(createHash(alg).update(buf1).update(buf2).update(buf3).digest('hex'), v[alg]); 34 | setTimeout(function() { 35 | t.end(); 36 | }); 37 | }); 38 | } 39 | if (process.argv[2]) { 40 | makeTest(process.argv[2], parseInt(process.argv[3], 10), true); 41 | } else { 42 | vectors.forEach(function(v, i) { 43 | makeTest('sha', i); 44 | makeTest('sha1', i); 45 | makeTest('sha224', i); 46 | makeTest('sha256', i); 47 | makeTest('sha384', i); 48 | makeTest('sha512', i); 49 | }); 50 | } 51 | })(require("buffer").Buffer, require("process")); 52 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "Brian J. Brennan", 4 | "email": "brianloveswords@gmail.com", 5 | "url": "http://bjb.io" 6 | }, 7 | "name": "buffer-crc32", 8 | "description": "A pure javascript CRC32 algorithm that plays nice with binary data", 9 | "version": "0.2.5", 10 | "licenses": [ 11 | { 12 | "type": "MIT", 13 | "url": "https://github.com/brianloveswords/buffer-crc32/raw/master/LICENSE" 14 | } 15 | ], 16 | "contributors": [ 17 | { 18 | "name": "Vladimir Kuznetsov" 19 | } 20 | ], 21 | "homepage": "https://github.com/brianloveswords/buffer-crc32", 22 | "repository": { 23 | "type": "git", 24 | "url": "git://github.com/brianloveswords/buffer-crc32.git" 25 | }, 26 | "main": "index.js", 27 | "scripts": { 28 | "test": "tap tests/*.test.js" 29 | }, 30 | "devDependencies": { 31 | "tap": "~0.2.5" 32 | }, 33 | "optionalDependencies": {}, 34 | "engines": { 35 | "node": "*" 36 | }, 37 | "license": "MIT", 38 | "gitHead": "beb976670f2ea6414e4cce4764d0213e5f9d7cbc", 39 | "bugs": { 40 | "url": "https://github.com/brianloveswords/buffer-crc32/issues" 41 | }, 42 | "_id": "buffer-crc32@0.2.5", 43 | "_shasum": "db003ac2671e62ebd6ece78ea2c2e1b405736e91", 44 | "_from": ".", 45 | "_npmVersion": "2.1.11", 46 | "_nodeVersion": "0.10.33", 47 | "_npmUser": { 48 | "name": "brianloveswords", 49 | "email": "brianloveswords@gmail.com" 50 | }, 51 | "maintainers": [ 52 | { 53 | "name": "brianloveswords", 54 | "email": "brian@nyhacker.org" 55 | } 56 | ], 57 | "dist": { 58 | "shasum": "db003ac2671e62ebd6ece78ea2c2e1b405736e91", 59 | "tarball": "http://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.5.tgz" 60 | }, 61 | "format": "cjs", 62 | "ignore": [ 63 | "node_modules" 64 | ], 65 | "registry": "npm", 66 | "dependencies": { 67 | "buffer": "github:jspm/nodelibs-buffer@^0.1.0" 68 | } 69 | } -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ieee754", 3 | "version": "1.1.6", 4 | "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object", 5 | "main": "index.js", 6 | "devDependencies": { 7 | "standard": "^4.1.1", 8 | "tape": "^4.0.0", 9 | "zuul": "^3.0.0" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git://github.com/feross/ieee754.git" 14 | }, 15 | "keywords": [ 16 | "ieee754", 17 | "IEEE 754", 18 | "floating point", 19 | "buffer", 20 | "convert" 21 | ], 22 | "author": { 23 | "name": "Feross Aboukhadijeh", 24 | "email": "feross@feross.org", 25 | "url": "http://feross.org/" 26 | }, 27 | "contributors": [ 28 | { 29 | "name": "Romain Beauxis", 30 | "email": "toots@rastageeks.org" 31 | } 32 | ], 33 | "scripts": { 34 | "test": "standard && npm run test-node && npm run test-browser", 35 | "test-browser": "zuul -- test/*.js", 36 | "test-browser-local": "zuul --local -- test/*.js", 37 | "test-node": "tape test/*.js" 38 | }, 39 | "license": "MIT", 40 | "gitHead": "d3b4a18991a20dd7977e32fe2e6cec1b73efe53d", 41 | "bugs": { 42 | "url": "https://github.com/feross/ieee754/issues" 43 | }, 44 | "homepage": "https://github.com/feross/ieee754#readme", 45 | "_id": "ieee754@1.1.6", 46 | "_shasum": "2e1013219c6d6712973ec54d981ec19e5579de97", 47 | "_from": ".", 48 | "_npmVersion": "2.9.1", 49 | "_nodeVersion": "0.12.3", 50 | "_npmUser": { 51 | "name": "feross", 52 | "email": "feross@feross.org" 53 | }, 54 | "maintainers": [ 55 | { 56 | "name": "feross", 57 | "email": "feross@feross.org" 58 | } 59 | ], 60 | "dist": { 61 | "shasum": "2e1013219c6d6712973ec54d981ec19e5579de97", 62 | "tarball": "http://registry.npmjs.org/ieee754/-/ieee754-1.1.6.tgz" 63 | }, 64 | "format": "cjs", 65 | "ignore": [ 66 | "node_modules" 67 | ], 68 | "registry": "npm", 69 | "dependencies": {} 70 | } -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": { 3 | "name": "T. Jameson Little", 4 | "email": "t.jameson.little@gmail.com" 5 | }, 6 | "name": "base64-js", 7 | "description": "Base64 encoding/decoding in pure JS", 8 | "version": "0.0.8", 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/beatgammit/base64-js.git" 12 | }, 13 | "main": "lib/b64.js", 14 | "scripts": { 15 | "test": "tape test/*.js" 16 | }, 17 | "testling": { 18 | "files": "test/*.js", 19 | "browsers": [ 20 | "ie/6..latest", 21 | "chrome/4..latest", 22 | "firefox/3..latest", 23 | "safari/5.1..latest", 24 | "opera/11.0..latest", 25 | "iphone/6", 26 | "ipad/6" 27 | ] 28 | }, 29 | "engines": { 30 | "node": ">= 0.4" 31 | }, 32 | "license": "MIT", 33 | "devDependencies": { 34 | "tape": "~2.3.2" 35 | }, 36 | "gitHead": "b4a8a5fa9b0caeddb5ad94dd1108253d8f2a315f", 37 | "bugs": { 38 | "url": "https://github.com/beatgammit/base64-js/issues" 39 | }, 40 | "homepage": "https://github.com/beatgammit/base64-js", 41 | "_id": "base64-js@0.0.8", 42 | "_shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978", 43 | "_from": ".", 44 | "_npmVersion": "2.1.16", 45 | "_nodeVersion": "0.10.35", 46 | "_npmUser": { 47 | "name": "feross", 48 | "email": "feross@feross.org" 49 | }, 50 | "maintainers": [ 51 | { 52 | "name": "beatgammit", 53 | "email": "t.jameson.little@gmail.com" 54 | }, 55 | { 56 | "name": "feross", 57 | "email": "feross@feross.org" 58 | } 59 | ], 60 | "dist": { 61 | "shasum": "1101e9544f4a76b1bc3b26d452ca96d7a35e7978", 62 | "tarball": "http://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz" 63 | }, 64 | "jspm": { 65 | "ignore": [ 66 | "bench", 67 | "node_modules" 68 | ] 69 | }, 70 | "ignore": [ 71 | "bench", 72 | "node_modules" 73 | ], 74 | "format": "cjs", 75 | "registry": "npm", 76 | "dependencies": {} 77 | } -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node/test-buffer-bytelength.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | 'use strict'; 4 | var Buffer = require("../../../buffer@3.3.1").Buffer; 5 | if (process.env.OBJECT_IMPL) 6 | Buffer.TYPED_ARRAY_SUPPORT = false; 7 | var common = {}; 8 | var assert = require("assert"); 9 | var Buffer = require("../../../buffer@3.3.1").Buffer; 10 | assert.equal(Buffer.byteLength(32, 'raw'), 2); 11 | assert.equal(Buffer.byteLength(NaN, 'utf8'), 3); 12 | assert.equal(Buffer.byteLength({}, 'raws'), 15); 13 | assert.equal(Buffer.byteLength(), 9); 14 | assert.equal(Buffer.byteLength('', 'ascii'), 0); 15 | assert.equal(Buffer.byteLength('', 'HeX'), 0); 16 | assert.equal(Buffer.byteLength('∑éllö wørl∂!', 'utf-8'), 19); 17 | assert.equal(Buffer.byteLength('κλμνξο', 'utf8'), 12); 18 | assert.equal(Buffer.byteLength('挵挶挷挸挹', 'utf-8'), 15); 19 | assert.equal(Buffer.byteLength('𠝹𠱓𠱸', 'UTF8'), 12); 20 | assert.equal(Buffer.byteLength('hey there'), 9); 21 | assert.equal(Buffer.byteLength('𠱸挶νξ#xx :)'), 17); 22 | assert.equal(Buffer.byteLength('hello world', ''), 11); 23 | assert.equal(Buffer.byteLength('hello world', 'abc'), 11); 24 | assert.equal(Buffer.byteLength('ßœ∑≈', 'unkn0wn enc0ding'), 10); 25 | assert.equal(Buffer.byteLength('aGVsbG8gd29ybGQ=', 'base64'), 11); 26 | assert.equal(Buffer.byteLength('bm9kZS5qcyByb2NrcyE=', 'base64'), 14); 27 | assert.equal(Buffer.byteLength('aGkk', 'base64'), 3); 28 | assert.equal(Buffer.byteLength('bHNrZGZsa3NqZmtsc2xrZmFqc2RsZmtqcw==', 'base64'), 25); 29 | assert.equal(Buffer.byteLength('aaa=', 'base64'), 2); 30 | assert.equal(Buffer.byteLength('aaaa==', 'base64'), 3); 31 | assert.equal(Buffer.byteLength('Il était tué'), 14); 32 | assert.equal(Buffer.byteLength('Il était tué', 'utf8'), 14); 33 | assert.equal(Buffer.byteLength('Il était tué', 'ascii'), 12); 34 | assert.equal(Buffer.byteLength('Il était tué', 'binary'), 12); 35 | ['ucs2', 'ucs-2', 'utf16le', 'utf-16le'].forEach(function(encoding) { 36 | assert.equal(24, Buffer.byteLength('Il était tué', encoding)); 37 | }); 38 | })(require("process")); 39 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sha.js", 3 | "description": "streaming sha1 hash in pure javascript", 4 | "version": "2.4.2", 5 | "homepage": "https://github.com/crypto-browserify/sha.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/crypto-browserify/sha.js.git" 9 | }, 10 | "devDependencies": { 11 | "buffer": "~2.3.2", 12 | "hash-test-vectors": "^1.3.1", 13 | "standard": "^4.0.0", 14 | "tape": "~2.3.2", 15 | "typedarray": "0.0.6" 16 | }, 17 | "bin": { 18 | "sha.js": "./bin.js" 19 | }, 20 | "scripts": { 21 | "prepublish": "npm ls && npm run unit", 22 | "lint": "standard", 23 | "test": "npm run lint && npm run unit", 24 | "unit": "set -e; for t in test/*.js; do node $t; done;" 25 | }, 26 | "author": { 27 | "name": "Dominic Tarr", 28 | "email": "dominic.tarr@gmail.com", 29 | "url": "dominictarr.com" 30 | }, 31 | "license": "MIT", 32 | "gitHead": "ee9184bb71cb672167b5f43f580ccb0cf9c22402", 33 | "bugs": { 34 | "url": "https://github.com/crypto-browserify/sha.js/issues" 35 | }, 36 | "_id": "sha.js@2.4.2", 37 | "_shasum": "bc345745589215a7200b5af774e68c3e44d2f188", 38 | "_from": ".", 39 | "_npmVersion": "2.11.0", 40 | "_nodeVersion": "0.12.4", 41 | "_npmUser": { 42 | "name": "dominictarr", 43 | "email": "dominic.tarr@gmail.com" 44 | }, 45 | "maintainers": [ 46 | { 47 | "name": "dominictarr", 48 | "email": "dominic.tarr@gmail.com" 49 | }, 50 | { 51 | "name": "dcousens", 52 | "email": "email@dcousens.com" 53 | } 54 | ], 55 | "dist": { 56 | "shasum": "bc345745589215a7200b5af774e68c3e44d2f188", 57 | "tarball": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.2.tgz" 58 | }, 59 | "format": "cjs", 60 | "ignore": [ 61 | "node_modules" 62 | ], 63 | "registry": "npm", 64 | "dependencies": { 65 | "inherits": "inherits@^2.0.1", 66 | "fs": "github:jspm/nodelibs-fs@^0.1.0", 67 | "process": "github:jspm/nodelibs-process@^0.1.0", 68 | "buffer": "github:jspm/nodelibs-buffer@^0.1.0" 69 | } 70 | } -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/test/node/format.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | var assert = require("assert"); 3 | var util = require("../../util"); 4 | assert.equal(util.format(), ''); 5 | assert.equal(util.format(''), ''); 6 | assert.equal(util.format([]), '[]'); 7 | assert.equal(util.format({}), '{}'); 8 | assert.equal(util.format(null), 'null'); 9 | assert.equal(util.format(true), 'true'); 10 | assert.equal(util.format(false), 'false'); 11 | assert.equal(util.format('test'), 'test'); 12 | assert.equal(util.format('foo', 'bar', 'baz'), 'foo bar baz'); 13 | assert.equal(util.format('%d', 42.0), '42'); 14 | assert.equal(util.format('%d', 42), '42'); 15 | assert.equal(util.format('%s', 42), '42'); 16 | assert.equal(util.format('%j', 42), '42'); 17 | assert.equal(util.format('%d', '42.0'), '42'); 18 | assert.equal(util.format('%d', '42'), '42'); 19 | assert.equal(util.format('%s', '42'), '42'); 20 | assert.equal(util.format('%j', '42'), '"42"'); 21 | assert.equal(util.format('%%s%s', 'foo'), '%sfoo'); 22 | assert.equal(util.format('%s'), '%s'); 23 | assert.equal(util.format('%s', undefined), 'undefined'); 24 | assert.equal(util.format('%s', 'foo'), 'foo'); 25 | assert.equal(util.format('%s:%s'), '%s:%s'); 26 | assert.equal(util.format('%s:%s', undefined), 'undefined:%s'); 27 | assert.equal(util.format('%s:%s', 'foo'), 'foo:%s'); 28 | assert.equal(util.format('%s:%s', 'foo', 'bar'), 'foo:bar'); 29 | assert.equal(util.format('%s:%s', 'foo', 'bar', 'baz'), 'foo:bar baz'); 30 | assert.equal(util.format('%%%s%%', 'hi'), '%hi%'); 31 | assert.equal(util.format('%%%s%%%%', 'hi'), '%hi%%'); 32 | (function() { 33 | var o = {}; 34 | o.o = o; 35 | assert.equal(util.format('%j', o), '[Circular]'); 36 | })(); 37 | assert.equal(util.format(new Error('foo')), '[Error: foo]'); 38 | function CustomError(msg) { 39 | Error.call(this); 40 | Object.defineProperty(this, 'message', { 41 | value: msg, 42 | enumerable: false 43 | }); 44 | Object.defineProperty(this, 'name', { 45 | value: 'CustomError', 46 | enumerable: false 47 | }); 48 | } 49 | util.inherits(CustomError, Error); 50 | assert.equal(util.format(new CustomError('bar')), '[CustomError: bar]'); 51 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/sha.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var inherits = require("inherits"); 4 | var Hash = require("./hash"); 5 | var W = new Array(80); 6 | function Sha() { 7 | this.init(); 8 | this._w = W; 9 | Hash.call(this, 64, 56); 10 | } 11 | inherits(Sha, Hash); 12 | Sha.prototype.init = function() { 13 | this._a = 0x67452301 | 0; 14 | this._b = 0xefcdab89 | 0; 15 | this._c = 0x98badcfe | 0; 16 | this._d = 0x10325476 | 0; 17 | this._e = 0xc3d2e1f0 | 0; 18 | return this; 19 | }; 20 | function rol(num, cnt) { 21 | return (num << cnt) | (num >>> (32 - cnt)); 22 | } 23 | Sha.prototype._update = function(M) { 24 | var W = this._w; 25 | var a = this._a; 26 | var b = this._b; 27 | var c = this._c; 28 | var d = this._d; 29 | var e = this._e; 30 | var j = 0, 31 | k; 32 | function calcW() { 33 | return W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16]; 34 | } 35 | function loop(w, f) { 36 | W[j] = w; 37 | var t = rol(a, 5) + f + e + w + k; 38 | e = d; 39 | d = c; 40 | c = rol(b, 30); 41 | b = a; 42 | a = t; 43 | j++; 44 | } 45 | k = 1518500249; 46 | while (j < 16) 47 | loop(M.readInt32BE(j * 4), (b & c) | ((~b) & d)); 48 | while (j < 20) 49 | loop(calcW(), (b & c) | ((~b) & d)); 50 | k = 1859775393; 51 | while (j < 40) 52 | loop(calcW(), b ^ c ^ d); 53 | k = -1894007588; 54 | while (j < 60) 55 | loop(calcW(), (b & c) | (b & d) | (c & d)); 56 | k = -899497514; 57 | while (j < 80) 58 | loop(calcW(), b ^ c ^ d); 59 | this._a = (a + this._a) | 0; 60 | this._b = (b + this._b) | 0; 61 | this._c = (c + this._c) | 0; 62 | this._d = (d + this._d) | 0; 63 | this._e = (e + this._e) | 0; 64 | }; 65 | Sha.prototype._hash = function() { 66 | var H = new Buffer(20); 67 | H.writeInt32BE(this._a | 0, 0); 68 | H.writeInt32BE(this._b | 0, 4); 69 | H.writeInt32BE(this._c | 0, 8); 70 | H.writeInt32BE(this._d | 0, 12); 71 | H.writeInt32BE(this._e | 0, 16); 72 | return H; 73 | }; 74 | module.exports = Sha; 75 | })(require("buffer").Buffer); 76 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/sha1.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var inherits = require("inherits"); 4 | var Hash = require("./hash"); 5 | var W = new Array(80); 6 | function Sha1() { 7 | this.init(); 8 | this._w = W; 9 | Hash.call(this, 64, 56); 10 | } 11 | inherits(Sha1, Hash); 12 | Sha1.prototype.init = function() { 13 | this._a = 0x67452301 | 0; 14 | this._b = 0xefcdab89 | 0; 15 | this._c = 0x98badcfe | 0; 16 | this._d = 0x10325476 | 0; 17 | this._e = 0xc3d2e1f0 | 0; 18 | return this; 19 | }; 20 | function rol(num, cnt) { 21 | return (num << cnt) | (num >>> (32 - cnt)); 22 | } 23 | Sha1.prototype._update = function(M) { 24 | var W = this._w; 25 | var a = this._a; 26 | var b = this._b; 27 | var c = this._c; 28 | var d = this._d; 29 | var e = this._e; 30 | var j = 0, 31 | k; 32 | function calcW() { 33 | return rol(W[j - 3] ^ W[j - 8] ^ W[j - 14] ^ W[j - 16], 1); 34 | } 35 | function loop(w, f) { 36 | W[j] = w; 37 | var t = rol(a, 5) + f + e + w + k; 38 | e = d; 39 | d = c; 40 | c = rol(b, 30); 41 | b = a; 42 | a = t; 43 | j++; 44 | } 45 | k = 1518500249; 46 | while (j < 16) 47 | loop(M.readInt32BE(j * 4), (b & c) | ((~b) & d)); 48 | while (j < 20) 49 | loop(calcW(), (b & c) | ((~b) & d)); 50 | k = 1859775393; 51 | while (j < 40) 52 | loop(calcW(), b ^ c ^ d); 53 | k = -1894007588; 54 | while (j < 60) 55 | loop(calcW(), (b & c) | (b & d) | (c & d)); 56 | k = -899497514; 57 | while (j < 80) 58 | loop(calcW(), b ^ c ^ d); 59 | this._a = (a + this._a) | 0; 60 | this._b = (b + this._b) | 0; 61 | this._c = (c + this._c) | 0; 62 | this._d = (d + this._d) | 0; 63 | this._e = (e + this._e) | 0; 64 | }; 65 | Sha1.prototype._hash = function() { 66 | var H = new Buffer(20); 67 | H.writeInt32BE(this._a | 0, 0); 68 | H.writeInt32BE(this._b | 0, 4); 69 | H.writeInt32BE(this._c | 0, 8); 70 | H.writeInt32BE(this._d | 0, 12); 71 | H.writeInt32BE(this._e | 0, 16); 72 | return H; 73 | }; 74 | module.exports = Sha1; 75 | })(require("buffer").Buffer); 76 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/test/hash.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var hexpp = require("../hexpp").defaults({bigendian: false}); 4 | var tape = require("tape"); 5 | var Hash = require("../hash"); 6 | var hex = '0A1B2C3D4E5F6G7H'; 7 | function equal(t, a, b) { 8 | t.equal(a.length, b.length); 9 | for (var i = 0; i < a.length; i++) { 10 | t.equal(a[i], b[i]); 11 | } 12 | } 13 | var hexBuf = new Buffer([48, 65, 49, 66, 50, 67, 51, 68, 52, 69, 53, 70, 54, 71, 55, 72]); 14 | var count16 = { 15 | strings: ['0A1B2C3D4E5F6G7H'], 16 | buffers: [hexBuf, new Buffer([128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128])] 17 | }; 18 | var empty = { 19 | strings: [''], 20 | buffers: [new Buffer([128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])] 21 | }; 22 | var multi = { 23 | strings: ['abcd', 'efhijk', 'lmnopq'], 24 | buffers: [new Buffer('abcdefhijklmnopq', 'ascii'), new Buffer([128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128])] 25 | }; 26 | var long = { 27 | strings: [hex + hex], 28 | buffers: [hexBuf, hexBuf, new Buffer([128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0])] 29 | }; 30 | function makeTest(name, data) { 31 | tape(name, function(t) { 32 | var h = new Hash(16, 8); 33 | var hash = new Buffer(20); 34 | var n = 2; 35 | var expected = data.buffers.slice(); 36 | h._update = function(block) { 37 | var e = expected.shift(); 38 | console.log('---block---'); 39 | console.log(hexpp(block), block.length); 40 | console.log('---e---'); 41 | console.log(hexpp(e), block.length); 42 | console.log(block); 43 | equal(t, block, e); 44 | if (n < 0) { 45 | throw new Error('expecting only 2 calls to _update'); 46 | } 47 | return hash; 48 | }; 49 | data.strings.forEach(function(string) { 50 | h.update(string, 'ascii'); 51 | }); 52 | equal(t, h.digest(), hash); 53 | t.end(); 54 | }); 55 | } 56 | makeTest('Hash#update 1 in 1', count16); 57 | makeTest('empty Hash#update', empty); 58 | makeTest('Hash#update 1 in 3', multi); 59 | makeTest('Hash#update 2 in 1', long); 60 | })(require("buffer").Buffer); 61 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "buffer", 3 | "description": "Node.js Buffer API, for the browser", 4 | "version": "3.3.1", 5 | "author": { 6 | "name": "Feross Aboukhadijeh", 7 | "email": "feross@feross.org", 8 | "url": "http://feross.org" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/feross/buffer/issues" 12 | }, 13 | "contributors": [ 14 | "Romain Beauxis ", 15 | "James Halliday " 16 | ], 17 | "dependencies": { 18 | "base64-js": "0.0.8", 19 | "ieee754": "^1.1.4", 20 | "is-array": "^1.0.1" 21 | }, 22 | "devDependencies": { 23 | "benchmark": "^1.0.0", 24 | "browserify": "^10.1.0", 25 | "concat-stream": "^1.4.7", 26 | "hyperquest": "^1.0.1", 27 | "is-nan": "^1.0.1", 28 | "split": "^1.0.0", 29 | "standard": "^4.3.2", 30 | "tape": "^4.0.0", 31 | "through2": "^2.0.0", 32 | "zuul": "^3.0.0" 33 | }, 34 | "homepage": "https://github.com/feross/buffer", 35 | "keywords": [ 36 | "buffer", 37 | "browserify", 38 | "compatible", 39 | "browser", 40 | "arraybuffer", 41 | "uint8array", 42 | "dataview" 43 | ], 44 | "license": "MIT", 45 | "main": "index.js", 46 | "repository": { 47 | "type": "git", 48 | "url": "git://github.com/feross/buffer.git" 49 | }, 50 | "scripts": { 51 | "test": "standard && node ./bin/test.js", 52 | "test-browser": "zuul -- test/*.js test/node/*.js", 53 | "test-browser-local": "zuul --local -- test/*.js test/node/*.js", 54 | "test-node": "tape test/*.js test/node/*.js test/node-es6/*.js && OBJECT_IMPL=true tape test/*.js test/node/*.js", 55 | "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", 56 | "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", 57 | "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c" 58 | }, 59 | "standard": { 60 | "ignore": [ 61 | "test/node/*.js", 62 | "test/node-es6/*.js", 63 | "test/_polyfill.js", 64 | "perf/*.js" 65 | ] 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6/index.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | exports.read = function (buffer, offset, isLE, mLen, nBytes) { 3 | var e, m 4 | var eLen = nBytes * 8 - mLen - 1 5 | var eMax = (1 << eLen) - 1 6 | var eBias = eMax >> 1 7 | var nBits = -7 8 | var i = isLE ? (nBytes - 1) : 0 9 | var d = isLE ? -1 : 1 10 | var s = buffer[offset + i] 11 | 12 | i += d 13 | 14 | e = s & ((1 << (-nBits)) - 1) 15 | s >>= (-nBits) 16 | nBits += eLen 17 | for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} 18 | 19 | m = e & ((1 << (-nBits)) - 1) 20 | e >>= (-nBits) 21 | nBits += mLen 22 | for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} 23 | 24 | if (e === 0) { 25 | e = 1 - eBias 26 | } else if (e === eMax) { 27 | return m ? NaN : ((s ? -1 : 1) * Infinity) 28 | } else { 29 | m = m + Math.pow(2, mLen) 30 | e = e - eBias 31 | } 32 | return (s ? -1 : 1) * m * Math.pow(2, e - mLen) 33 | } 34 | 35 | exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { 36 | var e, m, c 37 | var eLen = nBytes * 8 - mLen - 1 38 | var eMax = (1 << eLen) - 1 39 | var eBias = eMax >> 1 40 | var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) 41 | var i = isLE ? 0 : (nBytes - 1) 42 | var d = isLE ? 1 : -1 43 | var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 44 | 45 | value = Math.abs(value) 46 | 47 | if (isNaN(value) || value === Infinity) { 48 | m = isNaN(value) ? 1 : 0 49 | e = eMax 50 | } else { 51 | e = Math.floor(Math.log(value) / Math.LN2) 52 | if (value * (c = Math.pow(2, -e)) < 1) { 53 | e-- 54 | c *= 2 55 | } 56 | if (e + eBias >= 1) { 57 | value += rt / c 58 | } else { 59 | value += rt * Math.pow(2, 1 - eBias) 60 | } 61 | if (value * c >= 2) { 62 | e++ 63 | c /= 2 64 | } 65 | 66 | if (e + eBias >= eMax) { 67 | m = 0 68 | e = eMax 69 | } else if (e + eBias >= 1) { 70 | m = (value * c - 1) * Math.pow(2, mLen) 71 | e = e + eBias 72 | } else { 73 | m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) 74 | e = 0 75 | } 76 | } 77 | 78 | for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} 79 | 80 | e = (e << mLen) | m 81 | eLen += mLen 82 | for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} 83 | 84 | buffer[offset + i - d] |= s * 128 85 | } 86 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/to-string.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('utf8 buffer to base64', function(t) { 8 | t.equal(new B('Ձאab', 'utf8').toString('base64'), '1YHXkGFi'); 9 | t.end(); 10 | }); 11 | test('utf8 buffer to hex', function(t) { 12 | t.equal(new B('Ձאab', 'utf8').toString('hex'), 'd581d7906162'); 13 | t.end(); 14 | }); 15 | test('utf8 to utf8', function(t) { 16 | t.equal(new B('öäüõÖÄÜÕ', 'utf8').toString('utf8'), 'öäüõÖÄÜÕ'); 17 | t.end(); 18 | }); 19 | test('utf16le to utf16', function(t) { 20 | t.equal(new B(new B('abcd', 'utf8').toString('utf16le'), 'utf16le').toString('utf8'), 'abcd'); 21 | t.end(); 22 | }); 23 | test('utf16le to hex', function(t) { 24 | t.equal(new B('abcd', 'utf16le').toString('hex'), '6100620063006400'); 25 | t.end(); 26 | }); 27 | test('ascii buffer to base64', function(t) { 28 | t.equal(new B('123456!@#$%^', 'ascii').toString('base64'), 'MTIzNDU2IUAjJCVe'); 29 | t.end(); 30 | }); 31 | test('ascii buffer to hex', function(t) { 32 | t.equal(new B('123456!@#$%^', 'ascii').toString('hex'), '31323334353621402324255e'); 33 | t.end(); 34 | }); 35 | test('base64 buffer to utf8', function(t) { 36 | t.equal(new B('1YHXkGFi', 'base64').toString('utf8'), 'Ձאab'); 37 | t.end(); 38 | }); 39 | test('hex buffer to utf8', function(t) { 40 | t.equal(new B('d581d7906162', 'hex').toString('utf8'), 'Ձאab'); 41 | t.end(); 42 | }); 43 | test('base64 buffer to ascii', function(t) { 44 | t.equal(new B('MTIzNDU2IUAjJCVe', 'base64').toString('ascii'), '123456!@#$%^'); 45 | t.end(); 46 | }); 47 | test('hex buffer to ascii', function(t) { 48 | t.equal(new B('31323334353621402324255e', 'hex').toString('ascii'), '123456!@#$%^'); 49 | t.end(); 50 | }); 51 | test('base64 buffer to binary', function(t) { 52 | t.equal(new B('MTIzNDU2IUAjJCVe', 'base64').toString('binary'), '123456!@#$%^'); 53 | t.end(); 54 | }); 55 | test('hex buffer to binary', function(t) { 56 | t.equal(new B('31323334353621402324255e', 'hex').toString('binary'), '123456!@#$%^'); 57 | t.end(); 58 | }); 59 | test('utf8 to binary', function(t) { 60 | t.equal(new B('öäüõÖÄÜÕ', 'utf8').toString('binary'), 'öäüõÖÄÜÕ'); 61 | t.end(); 62 | }); 63 | })(require("process")); 64 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/test/test.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var crypto = require("crypto"); 4 | var tape = require("tape"); 5 | var Sha1 = require("../index").sha1; 6 | var inputs = [['', 'ascii'], ['abc', 'ascii'], ['123', 'ascii'], ['123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 'ascii'], ['123456789abcdef123456789abcdef123456789abcdef123456789abc', 'ascii'], ['123456789abcdef123456789abcdef123456789abcdef123456789ab', 'ascii'], ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde', 'ascii'], ['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef', 'ascii'], ['foobarbaz', 'ascii']]; 7 | tape("hash is the same as node's crypto", function(t) { 8 | inputs.forEach(function(v) { 9 | var a = new Sha1().update(v[0], v[1]).digest('hex'); 10 | var e = crypto.createHash('sha1').update(v[0], v[1]).digest('hex'); 11 | console.log(a, '==', e); 12 | t.equal(a, e); 13 | }); 14 | t.end(); 15 | }); 16 | tape('call update multiple times', function(t) { 17 | inputs.forEach(function(v) { 18 | var hash = new Sha1(); 19 | var _hash = crypto.createHash('sha1'); 20 | for (var i = 0; i < v[0].length; i = (i + 1) * 2) { 21 | var s = v[0].substring(i, (i + 1) * 2); 22 | hash.update(s, v[1]); 23 | _hash.update(s, v[1]); 24 | } 25 | var a = hash.digest('hex'); 26 | var e = _hash.digest('hex'); 27 | console.log(a, '==', e); 28 | t.equal(a, e); 29 | }); 30 | t.end(); 31 | }); 32 | tape('call update twice', function(t) { 33 | var _hash = crypto.createHash('sha1'); 34 | var hash = new Sha1(); 35 | _hash.update('foo', 'ascii'); 36 | hash.update('foo', 'ascii'); 37 | _hash.update('bar', 'ascii'); 38 | hash.update('bar', 'ascii'); 39 | _hash.update('baz', 'ascii'); 40 | hash.update('baz', 'ascii'); 41 | var a = hash.digest('hex'); 42 | var e = _hash.digest('hex'); 43 | t.equal(a, e); 44 | t.end(); 45 | }); 46 | tape('hex encoding', function(t) { 47 | inputs.forEach(function(v) { 48 | var hash = new Sha1(); 49 | var _hash = crypto.createHash('sha1'); 50 | for (var i = 0; i < v[0].length; i = (i + 1) * 2) { 51 | var s = v[0].substring(i, (i + 1) * 2); 52 | hash.update(new Buffer(s, 'ascii').toString('hex'), 'hex'); 53 | _hash.update(new Buffer(s, 'ascii').toString('hex'), 'hex'); 54 | } 55 | var a = hash.digest('hex'); 56 | var e = _hash.digest('hex'); 57 | console.log(a, '==', e); 58 | t.equal(a, e); 59 | }); 60 | t.end(); 61 | }); 62 | })(require("buffer").Buffer); 63 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/test/node/util.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | var assert = require("assert"); 3 | var context = require("vm").runInNewContext; 4 | var util = require("../../util"); 5 | assert.equal(true, util.isArray([])); 6 | assert.equal(true, util.isArray(Array())); 7 | assert.equal(true, util.isArray(new Array())); 8 | assert.equal(true, util.isArray(new Array(5))); 9 | assert.equal(true, util.isArray(new Array('with', 'some', 'entries'))); 10 | assert.equal(true, util.isArray(context('Array')())); 11 | assert.equal(false, util.isArray({})); 12 | assert.equal(false, util.isArray({push: function() {}})); 13 | assert.equal(false, util.isArray(/regexp/)); 14 | assert.equal(false, util.isArray(new Error)); 15 | assert.equal(false, util.isArray(Object.create(Array.prototype))); 16 | assert.equal(true, util.isRegExp(/regexp/)); 17 | assert.equal(true, util.isRegExp(RegExp())); 18 | assert.equal(true, util.isRegExp(new RegExp())); 19 | assert.equal(true, util.isRegExp(context('RegExp')())); 20 | assert.equal(false, util.isRegExp({})); 21 | assert.equal(false, util.isRegExp([])); 22 | assert.equal(false, util.isRegExp(new Date())); 23 | assert.equal(false, util.isRegExp(Object.create(RegExp.prototype))); 24 | assert.equal(true, util.isDate(new Date())); 25 | assert.equal(true, util.isDate(new Date(0))); 26 | assert.equal(true, util.isDate(new (context('Date')))); 27 | assert.equal(false, util.isDate(Date())); 28 | assert.equal(false, util.isDate({})); 29 | assert.equal(false, util.isDate([])); 30 | assert.equal(false, util.isDate(new Error)); 31 | assert.equal(false, util.isDate(Object.create(Date.prototype))); 32 | assert.equal(true, util.isError(new Error)); 33 | assert.equal(true, util.isError(new TypeError)); 34 | assert.equal(true, util.isError(new SyntaxError)); 35 | assert.equal(true, util.isError(new (context('Error')))); 36 | assert.equal(true, util.isError(new (context('TypeError')))); 37 | assert.equal(true, util.isError(new (context('SyntaxError')))); 38 | assert.equal(false, util.isError({})); 39 | assert.equal(false, util.isError({ 40 | name: 'Error', 41 | message: '' 42 | })); 43 | assert.equal(false, util.isError([])); 44 | assert.equal(true, util.isError(Object.create(Error.prototype))); 45 | assert.ok(util.isObject({}) === true); 46 | assert.deepEqual(util._extend({a: 1}), {a: 1}); 47 | assert.deepEqual(util._extend({a: 1}, []), {a: 1}); 48 | assert.deepEqual(util._extend({a: 1}, null), {a: 1}); 49 | assert.deepEqual(util._extend({a: 1}, true), {a: 1}); 50 | assert.deepEqual(util._extend({a: 1}, false), {a: 1}); 51 | assert.deepEqual(util._extend({a: 1}, {b: 2}), { 52 | a: 1, 53 | b: 2 54 | }); 55 | assert.deepEqual(util._extend({ 56 | a: 1, 57 | b: 2 58 | }, {b: 3}), { 59 | a: 1, 60 | b: 3 61 | }); 62 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5/tests/crc.test.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var crc32 = require("../index"); 4 | var test = require("tap").test; 5 | test('simple crc32 is no problem', function(t) { 6 | var input = Buffer('hey sup bros'); 7 | var expected = Buffer([0x47, 0xfa, 0x55, 0x70]); 8 | t.same(crc32(input), expected); 9 | t.end(); 10 | }); 11 | test('another simple one', function(t) { 12 | var input = Buffer('IEND'); 13 | var expected = Buffer([0xae, 0x42, 0x60, 0x82]); 14 | t.same(crc32(input), expected); 15 | t.end(); 16 | }); 17 | test('slightly more complex', function(t) { 18 | var input = Buffer([0x00, 0x00, 0x00]); 19 | var expected = Buffer([0xff, 0x41, 0xd9, 0x12]); 20 | t.same(crc32(input), expected); 21 | t.end(); 22 | }); 23 | test('complex crc32 gets calculated like a champ', function(t) { 24 | var input = Buffer('शीर्षक'); 25 | var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); 26 | t.same(crc32(input), expected); 27 | t.end(); 28 | }); 29 | test('casts to buffer if necessary', function(t) { 30 | var input = 'शीर्षक'; 31 | var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); 32 | t.same(crc32(input), expected); 33 | t.end(); 34 | }); 35 | test('can do signed', function(t) { 36 | var input = 'ham sandwich'; 37 | var expected = -1891873021; 38 | t.same(crc32.signed(input), expected); 39 | t.end(); 40 | }); 41 | test('can do unsigned', function(t) { 42 | var input = 'bear sandwich'; 43 | var expected = 3711466352; 44 | t.same(crc32.unsigned(input), expected); 45 | t.end(); 46 | }); 47 | test('simple crc32 in append mode', function(t) { 48 | var input = [Buffer('hey'), Buffer(' '), Buffer('sup'), Buffer(' '), Buffer('bros')]; 49 | var expected = Buffer([0x47, 0xfa, 0x55, 0x70]); 50 | for (var crc = 0, 51 | i = 0; i < input.length; i++) { 52 | crc = crc32(input[i], crc); 53 | } 54 | t.same(crc, expected); 55 | t.end(); 56 | }); 57 | test('can do signed in append mode', function(t) { 58 | var input1 = 'ham'; 59 | var input2 = ' '; 60 | var input3 = 'sandwich'; 61 | var expected = -1891873021; 62 | var crc = crc32.signed(input1); 63 | crc = crc32.signed(input2, crc); 64 | crc = crc32.signed(input3, crc); 65 | t.same(crc, expected); 66 | t.end(); 67 | }); 68 | test('can do unsigned in append mode', function(t) { 69 | var input1 = 'bear san'; 70 | var input2 = 'dwich'; 71 | var expected = 3711466352; 72 | var crc = crc32.unsigned(input1); 73 | crc = crc32.unsigned(input2, crc); 74 | t.same(crc, expected); 75 | t.end(); 76 | }); 77 | })(require("buffer").Buffer); 78 | -------------------------------------------------------------------------------- /jspm_packages/npm/ieee754@1.1.6/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Feross Aboukhadijeh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | 23 | =========================================== 24 | ieee754 originally contained this license: 25 | =========================================== 26 | 27 | Copyright (c) 2008, Fair Oaks Labs, Inc. 28 | All rights reserved. 29 | 30 | Redistribution and use in source and binary forms, with or without 31 | modification, are permitted provided that the following conditions are met: 32 | 33 | * Redistributions of source code must retain the above copyright notice, 34 | this list of conditions and the following disclaimer. 35 | 36 | * Redistributions in binary form must reproduce the above copyright notice, 37 | this list of conditions and the following disclaimer in the documentation 38 | and/or other materials provided with the distribution. 39 | 40 | * Neither the name of Fair Oaks Labs, Inc. nor the names of its contributors 41 | may be used to endorse or promote products derived from this software 42 | without specific prior written permission. 43 | 44 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 45 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 46 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 47 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 48 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 49 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 50 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 51 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 52 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 53 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 54 | POSSIBILITY OF SUCH DAMAGE. 55 | 56 | Modifications to writeIEEE754 to support negative zeroes made by Brian White. 57 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/methods.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('buffer.toJSON', function(t) { 8 | var data = [1, 2, 3, 4]; 9 | t.deepEqual(new B(data).toJSON(), { 10 | type: 'Buffer', 11 | data: [1, 2, 3, 4] 12 | }); 13 | t.end(); 14 | }); 15 | test('buffer.copy', function(t) { 16 | var buf1 = new B(26); 17 | var buf2 = new B(26); 18 | for (var i = 0; i < 26; i++) { 19 | buf1[i] = i + 97; 20 | buf2[i] = 33; 21 | } 22 | buf1.copy(buf2, 8, 16, 20); 23 | t.equal(buf2.toString('ascii', 0, 25), '!!!!!!!!qrst!!!!!!!!!!!!!'); 24 | t.end(); 25 | }); 26 | test('test offset returns are correct', function(t) { 27 | var b = new B(16); 28 | t.equal(4, b.writeUInt32LE(0, 0)); 29 | t.equal(6, b.writeUInt16LE(0, 4)); 30 | t.equal(7, b.writeUInt8(0, 6)); 31 | t.equal(8, b.writeInt8(0, 7)); 32 | t.equal(16, b.writeDoubleLE(0, 8)); 33 | t.end(); 34 | }); 35 | test('concat() a varying number of buffers', function(t) { 36 | var zero = []; 37 | var one = [new B('asdf')]; 38 | var long = []; 39 | for (var i = 0; i < 10; i++) { 40 | long.push(new B('asdf')); 41 | } 42 | var flatZero = B.concat(zero); 43 | var flatOne = B.concat(one); 44 | var flatLong = B.concat(long); 45 | var flatLongLen = B.concat(long, 40); 46 | t.equal(flatZero.length, 0); 47 | t.equal(flatOne.toString(), 'asdf'); 48 | t.equal(flatOne, one[0]); 49 | t.equal(flatLong.toString(), (new Array(10 + 1).join('asdf'))); 50 | t.equal(flatLongLen.toString(), (new Array(10 + 1).join('asdf'))); 51 | t.end(); 52 | }); 53 | test('fill', function(t) { 54 | var b = new B(10); 55 | b.fill(2); 56 | t.equal(b.toString('hex'), '02020202020202020202'); 57 | t.end(); 58 | }); 59 | test('fill (string)', function(t) { 60 | var b = new B(10); 61 | b.fill('abc'); 62 | t.equal(b.toString(), 'abcabcabca'); 63 | b.fill('է'); 64 | t.equal(b.toString(), 'էէէէէ'); 65 | t.end(); 66 | }); 67 | test('copy() empty buffer with sourceEnd=0', function(t) { 68 | var source = new B([42]); 69 | var destination = new B([43]); 70 | source.copy(destination, 0, 0, 0); 71 | t.equal(destination.readUInt8(0), 43); 72 | t.end(); 73 | }); 74 | test('copy() after slice()', function(t) { 75 | var source = new B(200); 76 | var dest = new B(200); 77 | var expected = new B(200); 78 | for (var i = 0; i < 200; i++) { 79 | source[i] = i; 80 | dest[i] = 0; 81 | } 82 | source.slice(2).copy(dest); 83 | source.copy(expected, 0, 2); 84 | t.deepEqual(dest, expected); 85 | t.end(); 86 | }); 87 | test('buffer.slice sets indexes', function(t) { 88 | t.equal((new B('hallo')).slice(0, 5).toString(), 'hallo'); 89 | t.end(); 90 | }); 91 | test('buffer.slice out of range', function(t) { 92 | t.plan(2); 93 | t.equal((new B('hallo')).slice(0, 10).toString(), 'hallo'); 94 | t.equal((new B('hallo')).slice(10, 2).toString(), ''); 95 | t.end(); 96 | }); 97 | })(require("process")); 98 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/node/test-buffer-indexof.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | 'use strict'; 4 | var Buffer = require("../../../buffer@3.3.1").Buffer; 5 | if (process.env.OBJECT_IMPL) 6 | Buffer.TYPED_ARRAY_SUPPORT = false; 7 | var common = {}; 8 | var assert = require("assert"); 9 | var Buffer = require("../../../buffer@3.3.1").Buffer; 10 | var b = new Buffer('abcdef'); 11 | var buf_a = new Buffer('a'); 12 | var buf_bc = new Buffer('bc'); 13 | var buf_f = new Buffer('f'); 14 | var buf_z = new Buffer('z'); 15 | var buf_empty = new Buffer(''); 16 | assert.equal(b.indexOf('a'), 0); 17 | assert.equal(b.indexOf('a', 1), -1); 18 | assert.equal(b.indexOf('a', -1), -1); 19 | assert.equal(b.indexOf('a', -4), -1); 20 | assert.equal(b.indexOf('a', -b.length), 0); 21 | assert.equal(b.indexOf('a', NaN), 0); 22 | assert.equal(b.indexOf('a', -Infinity), 0); 23 | assert.equal(b.indexOf('a', Infinity), -1); 24 | assert.equal(b.indexOf('bc'), 1); 25 | assert.equal(b.indexOf('bc', 2), -1); 26 | assert.equal(b.indexOf('bc', -1), -1); 27 | assert.equal(b.indexOf('bc', -3), -1); 28 | assert.equal(b.indexOf('bc', -5), 1); 29 | assert.equal(b.indexOf('bc', NaN), 1); 30 | assert.equal(b.indexOf('bc', -Infinity), 1); 31 | assert.equal(b.indexOf('bc', Infinity), -1); 32 | assert.equal(b.indexOf('f'), b.length - 1); 33 | assert.equal(b.indexOf('z'), -1); 34 | assert.equal(b.indexOf(''), -1); 35 | assert.equal(b.indexOf('', 1), -1); 36 | assert.equal(b.indexOf('', b.length + 1), -1); 37 | assert.equal(b.indexOf('', Infinity), -1); 38 | assert.equal(b.indexOf(buf_a), 0); 39 | assert.equal(b.indexOf(buf_a, 1), -1); 40 | assert.equal(b.indexOf(buf_a, -1), -1); 41 | assert.equal(b.indexOf(buf_a, -4), -1); 42 | assert.equal(b.indexOf(buf_a, -b.length), 0); 43 | assert.equal(b.indexOf(buf_a, NaN), 0); 44 | assert.equal(b.indexOf(buf_a, -Infinity), 0); 45 | assert.equal(b.indexOf(buf_a, Infinity), -1); 46 | assert.equal(b.indexOf(buf_bc), 1); 47 | assert.equal(b.indexOf(buf_bc, 2), -1); 48 | assert.equal(b.indexOf(buf_bc, -1), -1); 49 | assert.equal(b.indexOf(buf_bc, -3), -1); 50 | assert.equal(b.indexOf(buf_bc, -5), 1); 51 | assert.equal(b.indexOf(buf_bc, NaN), 1); 52 | assert.equal(b.indexOf(buf_bc, -Infinity), 1); 53 | assert.equal(b.indexOf(buf_bc, Infinity), -1); 54 | assert.equal(b.indexOf(buf_f), b.length - 1); 55 | assert.equal(b.indexOf(buf_z), -1); 56 | assert.equal(b.indexOf(buf_empty), -1); 57 | assert.equal(b.indexOf(buf_empty, 1), -1); 58 | assert.equal(b.indexOf(buf_empty, b.length + 1), -1); 59 | assert.equal(b.indexOf(buf_empty, Infinity), -1); 60 | assert.equal(b.indexOf(0x61), 0); 61 | assert.equal(b.indexOf(0x61, 1), -1); 62 | assert.equal(b.indexOf(0x61, -1), -1); 63 | assert.equal(b.indexOf(0x61, -4), -1); 64 | assert.equal(b.indexOf(0x61, -b.length), 0); 65 | assert.equal(b.indexOf(0x61, NaN), 0); 66 | assert.equal(b.indexOf(0x61, -Infinity), 0); 67 | assert.equal(b.indexOf(0x61, Infinity), -1); 68 | assert.equal(b.indexOf(0x0), -1); 69 | assert.throws(function() { 70 | b.indexOf(function() {}); 71 | }); 72 | assert.throws(function() { 73 | b.indexOf({}); 74 | }); 75 | assert.throws(function() { 76 | b.indexOf([]); 77 | }); 78 | })(require("process")); 79 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/test/browser/is.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var assert = require("assert"); 4 | var util = require("../../util"); 5 | suite('is'); 6 | test('util.isArray', function() { 7 | assert.equal(true, util.isArray([])); 8 | assert.equal(true, util.isArray(Array())); 9 | assert.equal(true, util.isArray(new Array())); 10 | assert.equal(true, util.isArray(new Array(5))); 11 | assert.equal(true, util.isArray(new Array('with', 'some', 'entries'))); 12 | assert.equal(false, util.isArray({})); 13 | assert.equal(false, util.isArray({push: function() {}})); 14 | assert.equal(false, util.isArray(/regexp/)); 15 | assert.equal(false, util.isArray(new Error())); 16 | assert.equal(false, util.isArray(Object.create(Array.prototype))); 17 | }); 18 | test('util.isRegExp', function() { 19 | assert.equal(true, util.isRegExp(/regexp/)); 20 | assert.equal(true, util.isRegExp(RegExp())); 21 | assert.equal(true, util.isRegExp(new RegExp())); 22 | assert.equal(false, util.isRegExp({})); 23 | assert.equal(false, util.isRegExp([])); 24 | assert.equal(false, util.isRegExp(new Date())); 25 | assert.equal(false, util.isRegExp(Object.create(RegExp.prototype))); 26 | }); 27 | test('util.isDate', function() { 28 | assert.equal(true, util.isDate(new Date())); 29 | assert.equal(true, util.isDate(new Date(0))); 30 | assert.equal(false, util.isDate(Date())); 31 | assert.equal(false, util.isDate({})); 32 | assert.equal(false, util.isDate([])); 33 | assert.equal(false, util.isDate(new Error())); 34 | assert.equal(false, util.isDate(Object.create(Date.prototype))); 35 | }); 36 | test('util.isError', function() { 37 | assert.equal(true, util.isError(new Error())); 38 | assert.equal(true, util.isError(new TypeError())); 39 | assert.equal(true, util.isError(new SyntaxError())); 40 | assert.equal(false, util.isError({})); 41 | assert.equal(false, util.isError({ 42 | name: 'Error', 43 | message: '' 44 | })); 45 | assert.equal(false, util.isError([])); 46 | assert.equal(true, util.isError(Object.create(Error.prototype))); 47 | }); 48 | test('util._extend', function() { 49 | assert.deepEqual(util._extend({a: 1}), {a: 1}); 50 | assert.deepEqual(util._extend({a: 1}, []), {a: 1}); 51 | assert.deepEqual(util._extend({a: 1}, null), {a: 1}); 52 | assert.deepEqual(util._extend({a: 1}, true), {a: 1}); 53 | assert.deepEqual(util._extend({a: 1}, false), {a: 1}); 54 | assert.deepEqual(util._extend({a: 1}, {b: 2}), { 55 | a: 1, 56 | b: 2 57 | }); 58 | assert.deepEqual(util._extend({ 59 | a: 1, 60 | b: 2 61 | }, {b: 3}), { 62 | a: 1, 63 | b: 3 64 | }); 65 | }); 66 | test('util.isBuffer', function() { 67 | assert.equal(true, util.isBuffer(new Buffer(4))); 68 | assert.equal(true, util.isBuffer(Buffer(4))); 69 | assert.equal(true, util.isBuffer(new Buffer(4))); 70 | assert.equal(true, util.isBuffer(new Buffer([1, 2, 3, 4]))); 71 | assert.equal(false, util.isBuffer({})); 72 | assert.equal(false, util.isBuffer([])); 73 | assert.equal(false, util.isBuffer(new Error())); 74 | assert.equal(false, util.isRegExp(new Date())); 75 | assert.equal(true, util.isBuffer(Object.create(Buffer.prototype))); 76 | }); 77 | })(require("buffer").Buffer); 78 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/.jspm.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "buffer", 3 | "description": "Node.js Buffer API, for the browser", 4 | "version": "3.3.1", 5 | "author": { 6 | "name": "Feross Aboukhadijeh", 7 | "email": "feross@feross.org", 8 | "url": "http://feross.org" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/feross/buffer/issues" 12 | }, 13 | "contributors": [ 14 | { 15 | "name": "Romain Beauxis", 16 | "email": "toots@rastageeks.org" 17 | }, 18 | { 19 | "name": "James Halliday", 20 | "email": "mail@substack.net" 21 | } 22 | ], 23 | "devDependencies": { 24 | "benchmark": "^1.0.0", 25 | "browserify": "^10.1.0", 26 | "concat-stream": "^1.4.7", 27 | "hyperquest": "^1.0.1", 28 | "is-nan": "^1.0.1", 29 | "split": "^1.0.0", 30 | "standard": "^4.3.2", 31 | "tape": "^4.0.0", 32 | "through2": "^2.0.0", 33 | "zuul": "^3.0.0" 34 | }, 35 | "homepage": "https://github.com/feross/buffer", 36 | "keywords": [ 37 | "buffer", 38 | "browserify", 39 | "compatible", 40 | "browser", 41 | "arraybuffer", 42 | "uint8array", 43 | "dataview" 44 | ], 45 | "license": "MIT", 46 | "main": "index.js", 47 | "repository": { 48 | "type": "git", 49 | "url": "git://github.com/feross/buffer.git" 50 | }, 51 | "scripts": { 52 | "test": "standard && node ./bin/test.js", 53 | "test-browser": "zuul -- test/*.js test/node/*.js", 54 | "test-browser-local": "zuul --local -- test/*.js test/node/*.js", 55 | "test-node": "tape test/*.js test/node/*.js test/node-es6/*.js && OBJECT_IMPL=true tape test/*.js test/node/*.js", 56 | "perf": "browserify --debug perf/bracket-notation.js > perf/bundle.js && open perf/index.html", 57 | "perf-node": "node perf/bracket-notation.js && node perf/concat.js && node perf/copy-big.js && node perf/copy.js && node perf/new-big.js && node perf/new.js && node perf/readDoubleBE.js && node perf/readFloatBE.js && node perf/readUInt32LE.js && node perf/slice.js && node perf/writeFloatBE.js", 58 | "size": "browserify -r ./ | uglifyjs -c -m | gzip | wc -c" 59 | }, 60 | "standard": { 61 | "ignore": [ 62 | "test/node/*.js", 63 | "test/node-es6/*.js", 64 | "test/_polyfill.js", 65 | "perf/*.js" 66 | ] 67 | }, 68 | "gitHead": "2faa3e5a76c68923b0bd1660f9016ab12170f0a0", 69 | "_id": "buffer@3.3.1", 70 | "_shasum": "c87bf2db2aa8e82f78d41fcfb82b40bb033bf44e", 71 | "_from": ".", 72 | "_npmVersion": "2.11.2", 73 | "_nodeVersion": "0.12.5", 74 | "_npmUser": { 75 | "name": "feross", 76 | "email": "feross@feross.org" 77 | }, 78 | "maintainers": [ 79 | { 80 | "name": "feross", 81 | "email": "feross@feross.org" 82 | } 83 | ], 84 | "dist": { 85 | "shasum": "c87bf2db2aa8e82f78d41fcfb82b40bb033bf44e", 86 | "tarball": "http://registry.npmjs.org/buffer/-/buffer-3.3.1.tgz" 87 | }, 88 | "jspm": { 89 | "ignore": [ 90 | "bin", 91 | "node_modules" 92 | ] 93 | }, 94 | "ignore": [ 95 | "bin", 96 | "node_modules" 97 | ], 98 | "format": "cjs", 99 | "registry": "npm", 100 | "dependencies": { 101 | "base64-js": "base64-js@0.0.8", 102 | "ieee754": "ieee754@^1.1.4", 103 | "is-array": "is-array@^1.0.1" 104 | } 105 | } -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/write.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | var isnan = require("is-nan"); 6 | if (process.env.OBJECT_IMPL) 7 | B.TYPED_ARRAY_SUPPORT = false; 8 | test('buffer.write string should get parsed as number', function(t) { 9 | var b = new B(64); 10 | b.writeUInt16LE('1003', 0); 11 | t.equal(b.readUInt16LE(0), 1003); 12 | t.end(); 13 | }); 14 | test('buffer.writeUInt8 a fractional number will get Math.floored', function(t) { 15 | var b = new B(1); 16 | b.writeInt8(5.5, 0); 17 | t.equal(b[0], 5); 18 | t.end(); 19 | }); 20 | test('writeUint8 with a negative number throws', function(t) { 21 | var buf = new B(1); 22 | t.throws(function() { 23 | buf.writeUInt8(-3, 0); 24 | }); 25 | t.end(); 26 | }); 27 | test('hex of write{Uint,Int}{8,16,32}{LE,BE}', function(t) { 28 | t.plan(2 * (2 * 2 * 2 + 2)); 29 | var hex = ['03', '0300', '0003', '03000000', '00000003', 'fd', 'fdff', 'fffd', 'fdffffff', 'fffffffd']; 30 | var reads = [3, 3, 3, 3, 3, -3, -3, -3, -3, -3]; 31 | var xs = ['UInt', 'Int']; 32 | var ys = [8, 16, 32]; 33 | for (var i = 0; i < xs.length; i++) { 34 | var x = xs[i]; 35 | for (var j = 0; j < ys.length; j++) { 36 | var y = ys[j]; 37 | var endianesses = (y === 8) ? [''] : ['LE', 'BE']; 38 | for (var k = 0; k < endianesses.length; k++) { 39 | var z = endianesses[k]; 40 | var v1 = new B(y / 8); 41 | var writefn = 'write' + x + y + z; 42 | var val = (x === 'Int') ? -3 : 3; 43 | v1[writefn](val, 0); 44 | t.equal(v1.toString('hex'), hex.shift()); 45 | var readfn = 'read' + x + y + z; 46 | t.equal(v1[readfn](0), reads.shift()); 47 | } 48 | } 49 | } 50 | t.end(); 51 | }); 52 | test('hex of write{Uint,Int}{8,16,32}{LE,BE} with overflow', function(t) { 53 | if (!B.TYPED_ARRAY_SUPPORT) { 54 | t.pass('object impl: skipping overflow test'); 55 | t.end(); 56 | return; 57 | } 58 | t.plan(3 * (2 * 2 * 2 + 2)); 59 | var hex = ['', '03', '00', '030000', '000000', '', 'fd', 'ff', 'fdffff', 'ffffff']; 60 | var reads = [undefined, 3, 0, NaN, 0, undefined, 253, -256, 16777213, -256]; 61 | var xs = ['UInt', 'Int']; 62 | var ys = [8, 16, 32]; 63 | for (var i = 0; i < xs.length; i++) { 64 | var x = xs[i]; 65 | for (var j = 0; j < ys.length; j++) { 66 | var y = ys[j]; 67 | var endianesses = (y === 8) ? [''] : ['LE', 'BE']; 68 | for (var k = 0; k < endianesses.length; k++) { 69 | var z = endianesses[k]; 70 | var v1 = new B(y / 8 - 1); 71 | var next = new B(4); 72 | next.writeUInt32BE(0, 0); 73 | var writefn = 'write' + x + y + z; 74 | var val = (x === 'Int') ? -3 : 3; 75 | v1[writefn](val, 0, true); 76 | t.equal(v1.toString('hex'), hex.shift()); 77 | t.equal(next.readUInt32BE(0), 0); 78 | next.writeInt32BE(~0, 0); 79 | var readfn = 'read' + x + y + z; 80 | var r = reads.shift(); 81 | if (isnan(r)) 82 | t.pass('equal'); 83 | else 84 | t.equal(v1[readfn](0, true), r); 85 | } 86 | } 87 | } 88 | t.end(); 89 | }); 90 | })(require("process")); 91 | -------------------------------------------------------------------------------- /jspm_packages/npm/sha.js@2.4.2/sha256.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var inherits = require("inherits"); 4 | var Hash = require("./hash"); 5 | var K = [0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2]; 6 | var W = new Array(64); 7 | function Sha256() { 8 | this.init(); 9 | this._w = W; 10 | Hash.call(this, 64, 56); 11 | } 12 | inherits(Sha256, Hash); 13 | Sha256.prototype.init = function() { 14 | this._a = 0x6a09e667 | 0; 15 | this._b = 0xbb67ae85 | 0; 16 | this._c = 0x3c6ef372 | 0; 17 | this._d = 0xa54ff53a | 0; 18 | this._e = 0x510e527f | 0; 19 | this._f = 0x9b05688c | 0; 20 | this._g = 0x1f83d9ab | 0; 21 | this._h = 0x5be0cd19 | 0; 22 | return this; 23 | }; 24 | function S(X, n) { 25 | return (X >>> n) | (X << (32 - n)); 26 | } 27 | function R(X, n) { 28 | return (X >>> n); 29 | } 30 | function Ch(x, y, z) { 31 | return ((x & y) ^ ((~x) & z)); 32 | } 33 | function Maj(x, y, z) { 34 | return ((x & y) ^ (x & z) ^ (y & z)); 35 | } 36 | function Sigma0256(x) { 37 | return (S(x, 2) ^ S(x, 13) ^ S(x, 22)); 38 | } 39 | function Sigma1256(x) { 40 | return (S(x, 6) ^ S(x, 11) ^ S(x, 25)); 41 | } 42 | function Gamma0256(x) { 43 | return (S(x, 7) ^ S(x, 18) ^ R(x, 3)); 44 | } 45 | function Gamma1256(x) { 46 | return (S(x, 17) ^ S(x, 19) ^ R(x, 10)); 47 | } 48 | Sha256.prototype._update = function(M) { 49 | var W = this._w; 50 | var a = this._a | 0; 51 | var b = this._b | 0; 52 | var c = this._c | 0; 53 | var d = this._d | 0; 54 | var e = this._e | 0; 55 | var f = this._f | 0; 56 | var g = this._g | 0; 57 | var h = this._h | 0; 58 | var j = 0; 59 | function calcW() { 60 | return Gamma1256(W[j - 2]) + W[j - 7] + Gamma0256(W[j - 15]) + W[j - 16]; 61 | } 62 | function loop(w) { 63 | W[j] = w; 64 | var T1 = h + Sigma1256(e) + Ch(e, f, g) + K[j] + w; 65 | var T2 = Sigma0256(a) + Maj(a, b, c); 66 | h = g; 67 | g = f; 68 | f = e; 69 | e = d + T1; 70 | d = c; 71 | c = b; 72 | b = a; 73 | a = T1 + T2; 74 | j++; 75 | } 76 | while (j < 16) 77 | loop(M.readInt32BE(j * 4)); 78 | while (j < 64) 79 | loop(calcW()); 80 | this._a = (a + this._a) | 0; 81 | this._b = (b + this._b) | 0; 82 | this._c = (c + this._c) | 0; 83 | this._d = (d + this._d) | 0; 84 | this._e = (e + this._e) | 0; 85 | this._f = (f + this._f) | 0; 86 | this._g = (g + this._g) | 0; 87 | this._h = (h + this._h) | 0; 88 | }; 89 | Sha256.prototype._hash = function() { 90 | var H = new Buffer(32); 91 | H.writeInt32BE(this._a, 0); 92 | H.writeInt32BE(this._b, 4); 93 | H.writeInt32BE(this._c, 8); 94 | H.writeInt32BE(this._d, 12); 95 | H.writeInt32BE(this._e, 16); 96 | H.writeInt32BE(this._f, 20); 97 | H.writeInt32BE(this._g, 24); 98 | H.writeInt32BE(this._h, 28); 99 | return H; 100 | }; 101 | module.exports = Sha256; 102 | })(require("buffer").Buffer); 103 | -------------------------------------------------------------------------------- /hash-implementations/sha256/jsSha2.js: -------------------------------------------------------------------------------- 1 | /* A JavaScript implementation of the Secure Hash Algorithm, SHA-256 2 | * Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/ 3 | * Distributed under the BSD License 4 | * Some bits taken from Paul Johnston's SHA-1 implementation 5 | */ 6 | var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ 7 | function safe_add (x, y) { 8 | var lsw = (x & 0xFFFF) + (y & 0xFFFF); 9 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16); 10 | return (msw << 16) | (lsw & 0xFFFF); 11 | } 12 | function S (X, n) {return ( X >>> n ) | (X << (32 - n));} 13 | function R (X, n) {return ( X >>> n );} 14 | function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));} 15 | function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));} 16 | function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));} 17 | function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));} 18 | function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));} 19 | function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));} 20 | function core_sha256 (m, l) { 21 | var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2); 22 | var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); 23 | var W = new Array(64); 24 | var a, b, c, d, e, f, g, h, i, j; 25 | var T1, T2; 26 | /* append padding */ 27 | m[l >> 5] |= 0x80 << (24 - l % 32); 28 | m[((l + 64 >> 9) << 4) + 15] = l; 29 | for ( var i = 0; i>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32); 47 | return bin; 48 | } 49 | function binb2hex (binarray) { 50 | var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ 51 | var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; 52 | var str = ""; 53 | for (var i = 0; i < binarray.length * 4; i++) { 54 | str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); 55 | } 56 | return str; 57 | } 58 | function hex_sha256(s){return binb2hex(core_sha256(str2binb(s),s.length * chrsz));} 59 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/from-string.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('detect utf16 surrogate pairs', function(t) { 8 | var text = '\uD83D\uDE38' + '\uD83D\uDCAD' + '\uD83D\uDC4D'; 9 | var buf = new B(text); 10 | t.equal(text, buf.toString()); 11 | t.end(); 12 | }); 13 | test('replace orphaned utf16 surrogate lead code point', function(t) { 14 | var text = '\uD83D\uDE38' + '\uD83D' + '\uD83D\uDC4D'; 15 | var buf = new B(text); 16 | t.deepEqual(buf, new B([0xf0, 0x9f, 0x98, 0xb8, 0xef, 0xbf, 0xbd, 0xf0, 0x9f, 0x91, 0x8d])); 17 | t.end(); 18 | }); 19 | test('replace orphaned utf16 surrogate trail code point', function(t) { 20 | var text = '\uD83D\uDE38' + '\uDCAD' + '\uD83D\uDC4D'; 21 | var buf = new B(text); 22 | t.deepEqual(buf, new B([0xf0, 0x9f, 0x98, 0xb8, 0xef, 0xbf, 0xbd, 0xf0, 0x9f, 0x91, 0x8d])); 23 | t.end(); 24 | }); 25 | test('do not write partial utf16 code units', function(t) { 26 | var f = new B([0, 0, 0, 0, 0]); 27 | t.equal(f.length, 5); 28 | var size = f.write('あいうえお', 'utf16le'); 29 | t.equal(size, 4); 30 | t.deepEqual(f, new B([0x42, 0x30, 0x44, 0x30, 0x00])); 31 | t.end(); 32 | }); 33 | test('handle partial utf16 code points when encoding to utf8 the way node does', function(t) { 34 | var text = '\uD83D\uDE38' + '\uD83D\uDC4D'; 35 | var buf = new B(8); 36 | buf.fill(0); 37 | buf.write(text); 38 | t.deepEqual(buf, new B([0xf0, 0x9f, 0x98, 0xb8, 0xf0, 0x9f, 0x91, 0x8d])); 39 | buf = new B(7); 40 | buf.fill(0); 41 | buf.write(text); 42 | t.deepEqual(buf, new B([0xf0, 0x9f, 0x98, 0xb8, 0x00, 0x00, 0x00])); 43 | buf = new B(6); 44 | buf.fill(0); 45 | buf.write(text); 46 | t.deepEqual(buf, new B([0xf0, 0x9f, 0x98, 0xb8, 0x00, 0x00])); 47 | buf = new B(5); 48 | buf.fill(0); 49 | buf.write(text); 50 | t.deepEqual(buf, new B([0xf0, 0x9f, 0x98, 0xb8, 0x00])); 51 | buf = new B(4); 52 | buf.fill(0); 53 | buf.write(text); 54 | t.deepEqual(buf, new B([0xf0, 0x9f, 0x98, 0xb8])); 55 | buf = new B(3); 56 | buf.fill(0); 57 | buf.write(text); 58 | t.deepEqual(buf, new B([0x00, 0x00, 0x00])); 59 | buf = new B(2); 60 | buf.fill(0); 61 | buf.write(text); 62 | t.deepEqual(buf, new B([0x00, 0x00])); 63 | buf = new B(1); 64 | buf.fill(0); 65 | buf.write(text); 66 | t.deepEqual(buf, new B([0x00])); 67 | t.end(); 68 | }); 69 | test('handle invalid utf16 code points when encoding to utf8 the way node does', function(t) { 70 | var text = 'a' + '\uDE38\uD83D' + 'b'; 71 | var buf = new B(8); 72 | buf.fill(0); 73 | buf.write(text); 74 | t.deepEqual(buf, new B([0x61, 0xef, 0xbf, 0xbd, 0xef, 0xbf, 0xbd, 0x62])); 75 | buf = new B(7); 76 | buf.fill(0); 77 | buf.write(text); 78 | t.deepEqual(buf, new B([0x61, 0xef, 0xbf, 0xbd, 0xef, 0xbf, 0xbd])); 79 | buf = new B(6); 80 | buf.fill(0); 81 | buf.write(text); 82 | t.deepEqual(buf, new B([0x61, 0xef, 0xbf, 0xbd, 0x00, 0x00])); 83 | buf = new B(5); 84 | buf.fill(0); 85 | buf.write(text); 86 | t.deepEqual(buf, new B([0x61, 0xef, 0xbf, 0xbd, 0x00])); 87 | buf = new B(4); 88 | buf.fill(0); 89 | buf.write(text); 90 | t.deepEqual(buf, new B([0x61, 0xef, 0xbf, 0xbd])); 91 | buf = new B(3); 92 | buf.fill(0); 93 | buf.write(text); 94 | t.deepEqual(buf, new B([0x61, 0x00, 0x00])); 95 | buf = new B(2); 96 | buf.fill(0); 97 | buf.write(text); 98 | t.deepEqual(buf, new B([0x61, 0x00])); 99 | buf = new B(1); 100 | buf.fill(0); 101 | buf.write(text); 102 | t.deepEqual(buf, new B([0x61])); 103 | t.end(); 104 | }); 105 | })(require("process")); 106 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer-crc32@0.2.5/index.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(Buffer) { 3 | var Buffer = require("buffer").Buffer; 4 | var CRC_TABLE = [0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d]; 5 | if (typeof Int32Array !== 'undefined') 6 | CRC_TABLE = new Int32Array(CRC_TABLE); 7 | function bufferizeInt(num) { 8 | var tmp = Buffer(4); 9 | tmp.writeInt32BE(num, 0); 10 | return tmp; 11 | } 12 | function _crc32(buf, previous) { 13 | if (!Buffer.isBuffer(buf)) { 14 | buf = Buffer(buf); 15 | } 16 | if (Buffer.isBuffer(previous)) { 17 | previous = previous.readUInt32BE(0); 18 | } 19 | var crc = ~~previous ^ -1; 20 | for (var n = 0; n < buf.length; n++) { 21 | crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); 22 | } 23 | return (crc ^ -1); 24 | } 25 | function crc32() { 26 | return bufferizeInt(_crc32.apply(null, arguments)); 27 | } 28 | crc32.signed = function() { 29 | return _crc32.apply(null, arguments); 30 | }; 31 | crc32.unsigned = function() { 32 | return _crc32.apply(null, arguments) >>> 0; 33 | }; 34 | module.exports = crc32; 35 | })(require("buffer").Buffer); 36 | -------------------------------------------------------------------------------- /jspm_packages/npm/base64-js@0.0.8/lib/b64.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; 3 | 4 | ;(function (exports) { 5 | 'use strict'; 6 | 7 | var Arr = (typeof Uint8Array !== 'undefined') 8 | ? Uint8Array 9 | : Array 10 | 11 | var PLUS = '+'.charCodeAt(0) 12 | var SLASH = '/'.charCodeAt(0) 13 | var NUMBER = '0'.charCodeAt(0) 14 | var LOWER = 'a'.charCodeAt(0) 15 | var UPPER = 'A'.charCodeAt(0) 16 | var PLUS_URL_SAFE = '-'.charCodeAt(0) 17 | var SLASH_URL_SAFE = '_'.charCodeAt(0) 18 | 19 | function decode (elt) { 20 | var code = elt.charCodeAt(0) 21 | if (code === PLUS || 22 | code === PLUS_URL_SAFE) 23 | return 62 // '+' 24 | if (code === SLASH || 25 | code === SLASH_URL_SAFE) 26 | return 63 // '/' 27 | if (code < NUMBER) 28 | return -1 //no match 29 | if (code < NUMBER + 10) 30 | return code - NUMBER + 26 + 26 31 | if (code < UPPER + 26) 32 | return code - UPPER 33 | if (code < LOWER + 26) 34 | return code - LOWER + 26 35 | } 36 | 37 | function b64ToByteArray (b64) { 38 | var i, j, l, tmp, placeHolders, arr 39 | 40 | if (b64.length % 4 > 0) { 41 | throw new Error('Invalid string. Length must be a multiple of 4') 42 | } 43 | 44 | // the number of equal signs (place holders) 45 | // if there are two placeholders, than the two characters before it 46 | // represent one byte 47 | // if there is only one, then the three characters before it represent 2 bytes 48 | // this is just a cheap hack to not do indexOf twice 49 | var len = b64.length 50 | placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 51 | 52 | // base64 is 4/3 + up to two characters of the original data 53 | arr = new Arr(b64.length * 3 / 4 - placeHolders) 54 | 55 | // if there are placeholders, only get up to the last complete 4 chars 56 | l = placeHolders > 0 ? b64.length - 4 : b64.length 57 | 58 | var L = 0 59 | 60 | function push (v) { 61 | arr[L++] = v 62 | } 63 | 64 | for (i = 0, j = 0; i < l; i += 4, j += 3) { 65 | tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) 66 | push((tmp & 0xFF0000) >> 16) 67 | push((tmp & 0xFF00) >> 8) 68 | push(tmp & 0xFF) 69 | } 70 | 71 | if (placeHolders === 2) { 72 | tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) 73 | push(tmp & 0xFF) 74 | } else if (placeHolders === 1) { 75 | tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) 76 | push((tmp >> 8) & 0xFF) 77 | push(tmp & 0xFF) 78 | } 79 | 80 | return arr 81 | } 82 | 83 | function uint8ToBase64 (uint8) { 84 | var i, 85 | extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes 86 | output = "", 87 | temp, length 88 | 89 | function encode (num) { 90 | return lookup.charAt(num) 91 | } 92 | 93 | function tripletToBase64 (num) { 94 | return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) 95 | } 96 | 97 | // go through the array every three bytes, we'll deal with trailing stuff later 98 | for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { 99 | temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) 100 | output += tripletToBase64(temp) 101 | } 102 | 103 | // pad the end with zeros, but make sure to not forget the extra bytes 104 | switch (extraBytes) { 105 | case 1: 106 | temp = uint8[uint8.length - 1] 107 | output += encode(temp >> 2) 108 | output += encode((temp << 4) & 0x3F) 109 | output += '==' 110 | break 111 | case 2: 112 | temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) 113 | output += encode(temp >> 10) 114 | output += encode((temp >> 4) & 0x3F) 115 | output += encode((temp << 2) & 0x3F) 116 | output += '=' 117 | break 118 | } 119 | 120 | return output 121 | } 122 | 123 | exports.toByteArray = b64ToByteArray 124 | exports.fromByteArray = uint8ToBase64 125 | }(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) 126 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/constructor.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | (function(process) { 3 | var B = require("../../buffer@3.3.1").Buffer; 4 | var test = require("tape"); 5 | if (process.env.OBJECT_IMPL) 6 | B.TYPED_ARRAY_SUPPORT = false; 7 | test('new buffer from array', function(t) { 8 | t.equal(new B([1, 2, 3]).toString(), '\u0001\u0002\u0003'); 9 | t.end(); 10 | }); 11 | test('new buffer from array w/ negatives', function(t) { 12 | t.equal(new B([-1, -2, -3]).toString('hex'), 'fffefd'); 13 | t.end(); 14 | }); 15 | test('new buffer from array with mixed signed input', function(t) { 16 | t.equal(new B([-255, 255, -128, 128, 512, -512, 511, -511]).toString('hex'), '01ff80800000ff01'); 17 | t.end(); 18 | }); 19 | test('new buffer from string', function(t) { 20 | t.equal(new B('hey', 'utf8').toString(), 'hey'); 21 | t.end(); 22 | }); 23 | test('new buffer from buffer', function(t) { 24 | var b1 = new B('asdf'); 25 | var b2 = new B(b1); 26 | t.equal(b1.toString('hex'), b2.toString('hex')); 27 | t.end(); 28 | }); 29 | test('new buffer from Uint8Array', function(t) { 30 | if (typeof Uint8Array !== 'undefined') { 31 | var b1 = new Uint8Array([0, 1, 2, 3]); 32 | var b2 = new B(b1); 33 | t.equal(b1.length, b2.length); 34 | t.equal(b1[0], 0); 35 | t.equal(b1[1], 1); 36 | t.equal(b1[2], 2); 37 | t.equal(b1[3], 3); 38 | t.equal(b1[4], undefined); 39 | } 40 | t.end(); 41 | }); 42 | test('new buffer from Uint16Array', function(t) { 43 | if (typeof Uint16Array !== 'undefined') { 44 | var b1 = new Uint16Array([0, 1, 2, 3]); 45 | var b2 = new B(b1); 46 | t.equal(b1.length, b2.length); 47 | t.equal(b1[0], 0); 48 | t.equal(b1[1], 1); 49 | t.equal(b1[2], 2); 50 | t.equal(b1[3], 3); 51 | t.equal(b1[4], undefined); 52 | } 53 | t.end(); 54 | }); 55 | test('new buffer from Uint32Array', function(t) { 56 | if (typeof Uint32Array !== 'undefined') { 57 | var b1 = new Uint32Array([0, 1, 2, 3]); 58 | var b2 = new B(b1); 59 | t.equal(b1.length, b2.length); 60 | t.equal(b1[0], 0); 61 | t.equal(b1[1], 1); 62 | t.equal(b1[2], 2); 63 | t.equal(b1[3], 3); 64 | t.equal(b1[4], undefined); 65 | } 66 | t.end(); 67 | }); 68 | test('new buffer from Int16Array', function(t) { 69 | if (typeof Int16Array !== 'undefined') { 70 | var b1 = new Int16Array([0, 1, 2, 3]); 71 | var b2 = new B(b1); 72 | t.equal(b1.length, b2.length); 73 | t.equal(b1[0], 0); 74 | t.equal(b1[1], 1); 75 | t.equal(b1[2], 2); 76 | t.equal(b1[3], 3); 77 | t.equal(b1[4], undefined); 78 | } 79 | t.end(); 80 | }); 81 | test('new buffer from Int32Array', function(t) { 82 | if (typeof Int32Array !== 'undefined') { 83 | var b1 = new Int32Array([0, 1, 2, 3]); 84 | var b2 = new B(b1); 85 | t.equal(b1.length, b2.length); 86 | t.equal(b1[0], 0); 87 | t.equal(b1[1], 1); 88 | t.equal(b1[2], 2); 89 | t.equal(b1[3], 3); 90 | t.equal(b1[4], undefined); 91 | } 92 | t.end(); 93 | }); 94 | test('new buffer from Float32Array', function(t) { 95 | if (typeof Float32Array !== 'undefined') { 96 | var b1 = new Float32Array([0, 1, 2, 3]); 97 | var b2 = new B(b1); 98 | t.equal(b1.length, b2.length); 99 | t.equal(b1[0], 0); 100 | t.equal(b1[1], 1); 101 | t.equal(b1[2], 2); 102 | t.equal(b1[3], 3); 103 | t.equal(b1[4], undefined); 104 | } 105 | t.end(); 106 | }); 107 | test('new buffer from Float64Array', function(t) { 108 | if (typeof Float64Array !== 'undefined') { 109 | var b1 = new Float64Array([0, 1, 2, 3]); 110 | var b2 = new B(b1); 111 | t.equal(b1.length, b2.length); 112 | t.equal(b1[0], 0); 113 | t.equal(b1[1], 1); 114 | t.equal(b1[2], 2); 115 | t.equal(b1[3], 3); 116 | t.equal(b1[4], undefined); 117 | } 118 | t.end(); 119 | }); 120 | test('new buffer from buffer.toJSON() output', function(t) { 121 | if (typeof JSON === 'undefined') { 122 | t.end(); 123 | return; 124 | } 125 | var buf = new B('test'); 126 | var json = JSON.stringify(buf); 127 | var obj = JSON.parse(json); 128 | var copy = new B(obj); 129 | t.ok(buf.equals(copy)); 130 | t.end(); 131 | }); 132 | })(require("process")); 133 | -------------------------------------------------------------------------------- /hash-implementations/sha256/CryptoJS.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(h,s){var f={},t=f.lib={},g=function(){},j=t.Base={extend:function(a){g.prototype=this;var c=new g;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | q=t.WordArray=j.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||u).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 9 | 32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=j.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, 10 | 2),16)<<24-4*(b%8);return new q.init(d,c/2)}},k=v.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},l=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}}, 11 | x=t.BufferedBlockAlgorithm=j.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var m=0;mk;){var l;a:{l=u;for(var x=h.sqrt(l),w=2;w<=x;w++)if(!(l%w)){l=!1;break a}l=!0}l&&(8>k&&(j[k]=v(h.pow(u,0.5))),q[k]=v(h.pow(u,1/3)),k++);u++}var a=[],f=f.SHA256=g.extend({_doReset:function(){this._hash=new t.init(j.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],m=b[2],h=b[3],p=b[4],j=b[5],k=b[6],l=b[7],n=0;64>n;n++){if(16>n)a[n]= 15 | c[d+n]|0;else{var r=a[n-15],g=a[n-2];a[n]=((r<<25|r>>>7)^(r<<14|r>>>18)^r>>>3)+a[n-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+a[n-16]}r=l+((p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25))+(p&j^~p&k)+q[n]+a[n];g=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&m^f&m);l=k;k=j;j=p;p=h+r|0;h=m;m=f;f=e;e=r+g|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+m|0;b[3]=b[3]+h|0;b[4]=b[4]+p|0;b[5]=b[5]+j|0;b[6]=b[6]+k|0;b[7]=b[7]+l|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; 16 | d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=g.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=g._createHelper(f);s.HmacSHA256=g._createHmacHelper(f)})(Math); 17 | -------------------------------------------------------------------------------- /jspm_packages/npm/buffer@3.3.1/test/_polyfill.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | "format cjs"; 3 | if (!Array.prototype.forEach) { 4 | 5 | Array.prototype.forEach = function(callback, thisArg) { 6 | 7 | var T, k; 8 | 9 | if (this == null) { 10 | throw new TypeError(' this is null or not defined'); 11 | } 12 | 13 | // 1. Let O be the result of calling ToObject passing the |this| value as the argument. 14 | var O = Object(this); 15 | 16 | // 2. Let lenValue be the result of calling the Get internal method of O with the argument "length". 17 | // 3. Let len be ToUint32(lenValue). 18 | var len = O.length >>> 0; 19 | 20 | // 4. If IsCallable(callback) is false, throw a TypeError exception. 21 | // See: http://es5.github.com/#x9.11 22 | if (typeof callback !== "function") { 23 | throw new TypeError(callback + ' is not a function'); 24 | } 25 | 26 | // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. 27 | if (arguments.length > 1) { 28 | T = thisArg; 29 | } 30 | 31 | // 6. Let k be 0 32 | k = 0; 33 | 34 | // 7. Repeat, while k < len 35 | while (k < len) { 36 | 37 | var kValue; 38 | 39 | // a. Let Pk be ToString(k). 40 | // This is implicit for LHS operands of the in operator 41 | // b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk. 42 | // This step can be combined with c 43 | // c. If kPresent is true, then 44 | if (k in O) { 45 | 46 | // i. Let kValue be the result of calling the Get internal method of O with argument Pk. 47 | kValue = O[k]; 48 | 49 | // ii. Call the Call internal method of callback with T as the this value and 50 | // argument list containing kValue, k, and O. 51 | callback.call(T, kValue, k, O); 52 | } 53 | // d. Increase k by 1. 54 | k++; 55 | } 56 | // 8. return undefined 57 | }; 58 | } 59 | 60 | if (!Array.isArray) { 61 | Array.isArray = function(arg) { 62 | return Object.prototype.toString.call(arg) === '[object Array]'; 63 | }; 64 | } 65 | 66 | if (!Array.prototype.map) { 67 | 68 | Array.prototype.map = function(callback, thisArg) { 69 | 70 | var T, A, k; 71 | 72 | if (this == null) { 73 | throw new TypeError(' this is null or not defined'); 74 | } 75 | 76 | // 1. Let O be the result of calling ToObject passing the |this| 77 | // value as the argument. 78 | var O = Object(this); 79 | 80 | // 2. Let lenValue be the result of calling the Get internal 81 | // method of O with the argument "length". 82 | // 3. Let len be ToUint32(lenValue). 83 | var len = O.length >>> 0; 84 | 85 | // 4. If IsCallable(callback) is false, throw a TypeError exception. 86 | // See: http://es5.github.com/#x9.11 87 | if (typeof callback !== 'function') { 88 | throw new TypeError(callback + ' is not a function'); 89 | } 90 | 91 | // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. 92 | if (arguments.length > 1) { 93 | T = thisArg; 94 | } 95 | 96 | // 6. Let A be a new array created as if by the expression new Array(len) 97 | // where Array is the standard built-in constructor with that name and 98 | // len is the value of len. 99 | A = new Array(len); 100 | 101 | // 7. Let k be 0 102 | k = 0; 103 | 104 | // 8. Repeat, while k < len 105 | while (k < len) { 106 | 107 | var kValue, mappedValue; 108 | 109 | // a. Let Pk be ToString(k). 110 | // This is implicit for LHS operands of the in operator 111 | // b. Let kPresent be the result of calling the HasProperty internal 112 | // method of O with argument Pk. 113 | // This step can be combined with c 114 | // c. If kPresent is true, then 115 | if (k in O) { 116 | 117 | // i. Let kValue be the result of calling the Get internal 118 | // method of O with argument Pk. 119 | kValue = O[k]; 120 | 121 | // ii. Let mappedValue be the result of calling the Call internal 122 | // method of callback with T as the this value and argument 123 | // list containing kValue, k, and O. 124 | mappedValue = callback.call(T, kValue, k, O); 125 | 126 | // iii. Call the DefineOwnProperty internal method of A with arguments 127 | // Pk, Property Descriptor 128 | // { Value: mappedValue, 129 | // Writable: true, 130 | // Enumerable: true, 131 | // Configurable: true }, 132 | // and false. 133 | 134 | // In browsers that support Object.defineProperty, use the following: 135 | // Object.defineProperty(A, k, { 136 | // value: mappedValue, 137 | // writable: true, 138 | // enumerable: true, 139 | // configurable: true 140 | // }); 141 | 142 | // For best browser support, use the following: 143 | A[k] = mappedValue; 144 | } 145 | // d. Increase k by 1. 146 | k++; 147 | } 148 | 149 | // 9. return A 150 | return A; 151 | }; 152 | } 153 | -------------------------------------------------------------------------------- /jspm_packages/npm/util@0.10.3/test/node/inspect.js: -------------------------------------------------------------------------------- 1 | /* */ 2 | var assert = require("assert"); 3 | var util = require("../../util"); 4 | var Date2 = require("vm").runInNewContext('Date'); 5 | var d = new Date2(); 6 | var orig = util.inspect(d); 7 | Date2.prototype.foo = 'bar'; 8 | var after = util.inspect(d); 9 | assert.equal(orig, after); 10 | var a = ['foo', 'bar', 'baz']; 11 | assert.equal(util.inspect(a), '[ \'foo\', \'bar\', \'baz\' ]'); 12 | delete a[1]; 13 | assert.equal(util.inspect(a), '[ \'foo\', , \'baz\' ]'); 14 | assert.equal(util.inspect(a, true), '[ \'foo\', , \'baz\', [length]: 3 ]'); 15 | assert.equal(util.inspect(new Array(5)), '[ , , , , ]'); 16 | var getter = Object.create(null, {a: {get: function() { 17 | return 'aaa'; 18 | }}}); 19 | var setter = Object.create(null, {b: {set: function() {}}}); 20 | var getterAndSetter = Object.create(null, {c: { 21 | get: function() { 22 | return 'ccc'; 23 | }, 24 | set: function() {} 25 | }}); 26 | assert.equal(util.inspect(getter, true), '{ [a]: [Getter] }'); 27 | assert.equal(util.inspect(setter, true), '{ [b]: [Setter] }'); 28 | assert.equal(util.inspect(getterAndSetter, true), '{ [c]: [Getter/Setter] }'); 29 | assert.equal(util.inspect(new Error()), '[Error]'); 30 | assert.equal(util.inspect(new Error('FAIL')), '[Error: FAIL]'); 31 | assert.equal(util.inspect(new TypeError('FAIL')), '[TypeError: FAIL]'); 32 | assert.equal(util.inspect(new SyntaxError('FAIL')), '[SyntaxError: FAIL]'); 33 | try { 34 | undef(); 35 | } catch (e) { 36 | assert.equal(util.inspect(e), '[ReferenceError: undef is not defined]'); 37 | } 38 | var ex = util.inspect(new Error('FAIL'), true); 39 | assert.ok(ex.indexOf('[Error: FAIL]') != -1); 40 | assert.ok(ex.indexOf('[stack]') != -1); 41 | assert.ok(ex.indexOf('[message]') != -1); 42 | assert.equal(util.inspect(Object.create(Date.prototype)), '{}'); 43 | assert.doesNotThrow(function() { 44 | var d = new Date(); 45 | d.toUTCString = null; 46 | util.inspect(d); 47 | }); 48 | assert.doesNotThrow(function() { 49 | var r = /regexp/; 50 | r.toString = null; 51 | util.inspect(r); 52 | }); 53 | assert.doesNotThrow(function() { 54 | util.inspect([{inspect: function() { 55 | return 123; 56 | }}]); 57 | }); 58 | var x = {inspect: util.inspect}; 59 | assert.ok(util.inspect(x).indexOf('inspect') != -1); 60 | function test_color_style(style, input, implicit) { 61 | var color_name = util.inspect.styles[style]; 62 | var color = ['', '']; 63 | if (util.inspect.colors[color_name]) 64 | color = util.inspect.colors[color_name]; 65 | var without_color = util.inspect(input, false, 0, false); 66 | var with_color = util.inspect(input, false, 0, true); 67 | var expect = '\u001b[' + color[0] + 'm' + without_color + '\u001b[' + color[1] + 'm'; 68 | assert.equal(with_color, expect, 'util.inspect color for style ' + style); 69 | } 70 | test_color_style('special', function() {}); 71 | test_color_style('number', 123.456); 72 | test_color_style('boolean', true); 73 | test_color_style('undefined', undefined); 74 | test_color_style('null', null); 75 | test_color_style('string', 'test string'); 76 | test_color_style('date', new Date); 77 | test_color_style('regexp', /regexp/); 78 | assert.doesNotThrow(function() { 79 | util.inspect({hasOwnProperty: null}); 80 | }); 81 | var subject = { 82 | foo: 'bar', 83 | hello: 31, 84 | a: {b: {c: {d: 0}}} 85 | }; 86 | Object.defineProperty(subject, 'hidden', { 87 | enumerable: false, 88 | value: null 89 | }); 90 | assert(util.inspect(subject, {showHidden: false}).indexOf('hidden') === -1); 91 | assert(util.inspect(subject, {showHidden: true}).indexOf('hidden') !== -1); 92 | assert(util.inspect(subject, {colors: false}).indexOf('\u001b[32m') === -1); 93 | assert(util.inspect(subject, {colors: true}).indexOf('\u001b[32m') !== -1); 94 | assert(util.inspect(subject, {depth: 2}).indexOf('c: [Object]') !== -1); 95 | assert(util.inspect(subject, {depth: 0}).indexOf('a: [Object]') !== -1); 96 | assert(util.inspect(subject, {depth: null}).indexOf('{ d: 0 }') !== -1); 97 | subject = {inspect: function() { 98 | return 123; 99 | }}; 100 | assert(util.inspect(subject, {customInspect: true}).indexOf('123') !== -1); 101 | assert(util.inspect(subject, {customInspect: true}).indexOf('inspect') === -1); 102 | assert(util.inspect(subject, {customInspect: false}).indexOf('123') === -1); 103 | assert(util.inspect(subject, {customInspect: false}).indexOf('inspect') !== -1); 104 | subject.inspect = function() { 105 | return {foo: 'bar'}; 106 | }; 107 | assert.equal(util.inspect(subject), '{ foo: \'bar\' }'); 108 | subject.inspect = function(depth, opts) { 109 | assert.strictEqual(opts.customInspectOptions, true); 110 | }; 111 | util.inspect(subject, {customInspectOptions: true}); 112 | function test_lines(input) { 113 | var count_lines = function(str) { 114 | return (str.match(/\n/g) || []).length; 115 | }; 116 | var without_color = util.inspect(input); 117 | var with_color = util.inspect(input, {colors: true}); 118 | assert.equal(count_lines(without_color), count_lines(with_color)); 119 | } 120 | test_lines([1, 2, 3, 4, 5, 6, 7]); 121 | test_lines(function() { 122 | var big_array = []; 123 | for (var i = 0; i < 100; i++) { 124 | big_array.push(i); 125 | } 126 | return big_array; 127 | }()); 128 | test_lines({ 129 | foo: 'bar', 130 | baz: 35, 131 | b: {a: 35} 132 | }); 133 | test_lines({ 134 | foo: 'bar', 135 | baz: 35, 136 | b: {a: 35}, 137 | very_long_key: 'very_long_value', 138 | even_longer_key: ['with even longer value in array'] 139 | }); 140 | -------------------------------------------------------------------------------- /hash-implementations/sha3/CryptoJS.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(v,p){var d={},u=d.lib={},r=function(){},f=u.Base={extend:function(a){r.prototype=this;var b=new r;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | s=u.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=p?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,c=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var n=0;n>>2]|=(c[n>>>2]>>>24-8*(n%4)&255)<<24-8*((j+n)%4);else if(65535>>2]=c[n>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< 9 | 32-8*(b%4);a.length=v.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],c=0;c>>2]>>>24-8*(j%4)&255;c.push((n>>>4).toString(16));c.push((n&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>3]|=parseInt(a.substr(j, 10 | 2),16)<<24-4*(j%8);return new s.init(c,b/2)}},e=x.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],j=0;j>>2]>>>24-8*(j%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new s.init(c,b)}},q=x.Utf8={stringify:function(a){try{return decodeURIComponent(escape(e.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return e.parse(unescape(encodeURIComponent(a)))}}, 11 | t=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=q.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,j=b.sigBytes,n=this.blockSize,e=j/(4*n),e=a?v.ceil(e):v.max((e|0)-this._minBufferSize,0);a=e*n;j=v.min(4*a,j);if(a){for(var f=0;ft;t++){s[e+5*q]=(t+1)*(t+2)/2%64;var w=(2*e+3*q)%5,e=q%5,q=w}for(e=0;5>e;e++)for(q=0;5>q;q++)x[e+5*q]=q+5*((2*e+3*q)%5);e=1;for(q=0;24>q;q++){for(var a=w=t=0;7>a;a++){if(e&1){var b=(1<b?w^=1<e;e++)c[e]=f.create();d=d.SHA3=r.extend({cfg:r.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= 16 | [],b=0;25>b;b++)a[b]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var e=this._state,f=this.blockSize/2,h=0;h>>24)&16711935|(l<<24|l>>>8)&4278255360,m=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g=e[h];g.high^=m;g.low^=l}for(f=0;24>f;f++){for(h=0;5>h;h++){for(var d=l=0,k=0;5>k;k++)g=e[h+5*k],l^=g.high,d^=g.low;g=c[h];g.high=l;g.low=d}for(h=0;5>h;h++){g=c[(h+4)%5];l=c[(h+1)%5];m=l.high;k=l.low;l=g.high^ 17 | (m<<1|k>>>31);d=g.low^(k<<1|m>>>31);for(k=0;5>k;k++)g=e[h+5*k],g.high^=l,g.low^=d}for(m=1;25>m;m++)g=e[m],h=g.high,g=g.low,k=s[m],32>k?(l=h<>>32-k,d=g<>>32-k):(l=g<>>64-k,d=h<>>64-k),g=c[x[m]],g.high=l,g.low=d;g=c[0];h=e[0];g.high=h.high;g.low=h.low;for(h=0;5>h;h++)for(k=0;5>k;k++)m=h+5*k,g=e[m],l=c[m],m=c[(h+1)%5+5*k],d=c[(h+2)%5+5*k],g.high=l.high^~m.high&d.high,g.low=l.low^~m.low&d.low;g=e[0];h=y[f];g.high^=h.high;g.low^=h.low}},_doFinalize:function(){var a=this._data, 18 | b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(v.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],h=0;h>>24)&16711935|(f<<24|f>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;e.push(d);e.push(f)}return new u.init(e,b)},clone:function(){for(var a=r.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); 19 | p.SHA3=r._createHelper(d);p.HmacSHA3=r._createHmacHelper(d)})(Math); 20 | -------------------------------------------------------------------------------- /hash-implementations/md5/CryptoJS.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(s,p){var m={},l=m.lib={},n=function(){},r=l.Base={extend:function(b){n.prototype=this;var h=new n;b&&h.mixIn(b);h.hasOwnProperty("init")||(h.init=function(){h.$super.init.apply(this,arguments)});h.init.prototype=h;h.$super=this;return h},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var h in b)b.hasOwnProperty(h)&&(this[h]=b[h]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | q=l.WordArray=r.extend({init:function(b,h){b=this.words=b||[];this.sigBytes=h!=p?h:4*b.length},toString:function(b){return(b||t).stringify(this)},concat:function(b){var h=this.words,a=b.words,j=this.sigBytes;b=b.sigBytes;this.clamp();if(j%4)for(var g=0;g>>2]|=(a[g>>>2]>>>24-8*(g%4)&255)<<24-8*((j+g)%4);else if(65535>>2]=a[g>>>2];else h.push.apply(h,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,h=this.sigBytes;b[h>>>2]&=4294967295<< 9 | 32-8*(h%4);b.length=s.ceil(h/4)},clone:function(){var b=r.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var h=[],a=0;a>>2]>>>24-8*(j%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j>>3]|=parseInt(b.substr(j, 10 | 2),16)<<24-4*(j%8);return new q.init(g,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j>>2]>>>24-8*(j%4)&255));return g.join("")},parse:function(b){for(var a=b.length,g=[],j=0;j>>2]|=(b.charCodeAt(j)&255)<<24-8*(j%4);return new q.init(g,a)}},u=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(g){throw Error("Malformed UTF-8 data");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}}, 11 | g=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(b){"string"==typeof b&&(b=u.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,g=a.words,j=a.sigBytes,k=this.blockSize,m=j/(4*k),m=b?s.ceil(m):s.max((m|0)-this._minBufferSize,0);b=m*k;j=s.min(4*b,j);if(b){for(var l=0;l>>32-j)+k}function m(a,k,b,h,l,j,m){a=a+(k&h|b&~h)+l+m;return(a<>>32-j)+k}function l(a,k,b,h,l,j,m){a=a+(k^b^h)+l+m;return(a<>>32-j)+k}function n(a,k,b,h,l,j,m){a=a+(b^(k|~h))+l+m;return(a<>>32-j)+k}for(var r=CryptoJS,q=r.lib,v=q.WordArray,t=q.Hasher,q=r.algo,a=[],u=0;64>u;u++)a[u]=4294967296*s.abs(s.sin(u+1))|0;q=q.MD5=t.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])}, 15 | _doProcessBlock:function(g,k){for(var b=0;16>b;b++){var h=k+b,w=g[h];g[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var b=this._hash.words,h=g[k+0],w=g[k+1],j=g[k+2],q=g[k+3],r=g[k+4],s=g[k+5],t=g[k+6],u=g[k+7],v=g[k+8],x=g[k+9],y=g[k+10],z=g[k+11],A=g[k+12],B=g[k+13],C=g[k+14],D=g[k+15],c=b[0],d=b[1],e=b[2],f=b[3],c=p(c,d,e,f,h,7,a[0]),f=p(f,c,d,e,w,12,a[1]),e=p(e,f,c,d,j,17,a[2]),d=p(d,e,f,c,q,22,a[3]),c=p(c,d,e,f,r,7,a[4]),f=p(f,c,d,e,s,12,a[5]),e=p(e,f,c,d,t,17,a[6]),d=p(d,e,f,c,u,22,a[7]), 16 | c=p(c,d,e,f,v,7,a[8]),f=p(f,c,d,e,x,12,a[9]),e=p(e,f,c,d,y,17,a[10]),d=p(d,e,f,c,z,22,a[11]),c=p(c,d,e,f,A,7,a[12]),f=p(f,c,d,e,B,12,a[13]),e=p(e,f,c,d,C,17,a[14]),d=p(d,e,f,c,D,22,a[15]),c=m(c,d,e,f,w,5,a[16]),f=m(f,c,d,e,t,9,a[17]),e=m(e,f,c,d,z,14,a[18]),d=m(d,e,f,c,h,20,a[19]),c=m(c,d,e,f,s,5,a[20]),f=m(f,c,d,e,y,9,a[21]),e=m(e,f,c,d,D,14,a[22]),d=m(d,e,f,c,r,20,a[23]),c=m(c,d,e,f,x,5,a[24]),f=m(f,c,d,e,C,9,a[25]),e=m(e,f,c,d,q,14,a[26]),d=m(d,e,f,c,v,20,a[27]),c=m(c,d,e,f,B,5,a[28]),f=m(f,c, 17 | d,e,j,9,a[29]),e=m(e,f,c,d,u,14,a[30]),d=m(d,e,f,c,A,20,a[31]),c=l(c,d,e,f,s,4,a[32]),f=l(f,c,d,e,v,11,a[33]),e=l(e,f,c,d,z,16,a[34]),d=l(d,e,f,c,C,23,a[35]),c=l(c,d,e,f,w,4,a[36]),f=l(f,c,d,e,r,11,a[37]),e=l(e,f,c,d,u,16,a[38]),d=l(d,e,f,c,y,23,a[39]),c=l(c,d,e,f,B,4,a[40]),f=l(f,c,d,e,h,11,a[41]),e=l(e,f,c,d,q,16,a[42]),d=l(d,e,f,c,t,23,a[43]),c=l(c,d,e,f,x,4,a[44]),f=l(f,c,d,e,A,11,a[45]),e=l(e,f,c,d,D,16,a[46]),d=l(d,e,f,c,j,23,a[47]),c=n(c,d,e,f,h,6,a[48]),f=n(f,c,d,e,u,10,a[49]),e=n(e,f,c,d, 18 | C,15,a[50]),d=n(d,e,f,c,s,21,a[51]),c=n(c,d,e,f,A,6,a[52]),f=n(f,c,d,e,q,10,a[53]),e=n(e,f,c,d,y,15,a[54]),d=n(d,e,f,c,w,21,a[55]),c=n(c,d,e,f,v,6,a[56]),f=n(f,c,d,e,D,10,a[57]),e=n(e,f,c,d,t,15,a[58]),d=n(d,e,f,c,B,21,a[59]),c=n(c,d,e,f,r,6,a[60]),f=n(f,c,d,e,z,10,a[61]),e=n(e,f,c,d,j,15,a[62]),d=n(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,k=a.words,b=8*this._nDataBytes,h=8*a.sigBytes;k[h>>>5]|=128<<24-h%32;var l=s.floor(b/ 19 | 4294967296);k[(h+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;k[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(k.length+1);this._process();a=this._hash;k=a.words;for(b=0;4>b;b++)h=k[b],k[b]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;return a},clone:function(){var a=t.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=t._createHelper(q);r.HmacMD5=t._createHmacHelper(q)})(Math); 20 | -------------------------------------------------------------------------------- /hash-implementations/md5/yamd5.min.js: -------------------------------------------------------------------------------- 1 | // project home: https://github.com/gorhill/yamd5.js 2 | // minified using http://refresh-sf.com/yui/ 3 | ;(function(g){var b=function(l,n){var m=l[0],j=l[1],p=l[2],o=l[3];m+=(j&p|~j&o)+n[0]-680876936|0;m=(m<<7|m>>>25)+j|0;o+=(m&j|~m&p)+n[1]-389564586|0; 4 | o=(o<<12|o>>>20)+m|0;p+=(o&m|~o&j)+n[2]+606105819|0;p=(p<<17|p>>>15)+o|0;j+=(p&o|~p&m)+n[3]-1044525330|0;j=(j<<22|j>>>10)+p|0; 5 | m+=(j&p|~j&o)+n[4]-176418897|0;m=(m<<7|m>>>25)+j|0;o+=(m&j|~m&p)+n[5]+1200080426|0;o=(o<<12|o>>>20)+m|0;p+=(o&m|~o&j)+n[6]-1473231341|0; 6 | p=(p<<17|p>>>15)+o|0;j+=(p&o|~p&m)+n[7]-45705983|0;j=(j<<22|j>>>10)+p|0;m+=(j&p|~j&o)+n[8]+1770035416|0;m=(m<<7|m>>>25)+j|0; 7 | o+=(m&j|~m&p)+n[9]-1958414417|0;o=(o<<12|o>>>20)+m|0;p+=(o&m|~o&j)+n[10]-42063|0;p=(p<<17|p>>>15)+o|0;j+=(p&o|~p&m)+n[11]-1990404162|0; 8 | j=(j<<22|j>>>10)+p|0;m+=(j&p|~j&o)+n[12]+1804603682|0;m=(m<<7|m>>>25)+j|0;o+=(m&j|~m&p)+n[13]-40341101|0;o=(o<<12|o>>>20)+m|0; 9 | p+=(o&m|~o&j)+n[14]-1502002290|0;p=(p<<17|p>>>15)+o|0;j+=(p&o|~p&m)+n[15]+1236535329|0;j=(j<<22|j>>>10)+p|0;m+=(j&o|p&~o)+n[1]-165796510|0; 10 | m=(m<<5|m>>>27)+j|0;o+=(m&p|j&~p)+n[6]-1069501632|0;o=(o<<9|o>>>23)+m|0;p+=(o&j|m&~j)+n[11]+643717713|0;p=(p<<14|p>>>18)+o|0; 11 | j+=(p&m|o&~m)+n[0]-373897302|0;j=(j<<20|j>>>12)+p|0;m+=(j&o|p&~o)+n[5]-701558691|0;m=(m<<5|m>>>27)+j|0;o+=(m&p|j&~p)+n[10]+38016083|0; 12 | o=(o<<9|o>>>23)+m|0;p+=(o&j|m&~j)+n[15]-660478335|0;p=(p<<14|p>>>18)+o|0;j+=(p&m|o&~m)+n[4]-405537848|0;j=(j<<20|j>>>12)+p|0; 13 | m+=(j&o|p&~o)+n[9]+568446438|0;m=(m<<5|m>>>27)+j|0;o+=(m&p|j&~p)+n[14]-1019803690|0;o=(o<<9|o>>>23)+m|0;p+=(o&j|m&~j)+n[3]-187363961|0; 14 | p=(p<<14|p>>>18)+o|0;j+=(p&m|o&~m)+n[8]+1163531501|0;j=(j<<20|j>>>12)+p|0;m+=(j&o|p&~o)+n[13]-1444681467|0;m=(m<<5|m>>>27)+j|0; 15 | o+=(m&p|j&~p)+n[2]-51403784|0;o=(o<<9|o>>>23)+m|0;p+=(o&j|m&~j)+n[7]+1735328473|0;p=(p<<14|p>>>18)+o|0;j+=(p&m|o&~m)+n[12]-1926607734|0; 16 | j=(j<<20|j>>>12)+p|0;m+=(j^p^o)+n[5]-378558|0;m=(m<<4|m>>>28)+j|0;o+=(m^j^p)+n[8]-2022574463|0;o=(o<<11|o>>>21)+m|0;p+=(o^m^j)+n[11]+1839030562|0; 17 | p=(p<<16|p>>>16)+o|0;j+=(p^o^m)+n[14]-35309556|0;j=(j<<23|j>>>9)+p|0;m+=(j^p^o)+n[1]-1530992060|0;m=(m<<4|m>>>28)+j|0;o+=(m^j^p)+n[4]+1272893353|0; 18 | o=(o<<11|o>>>21)+m|0;p+=(o^m^j)+n[7]-155497632|0;p=(p<<16|p>>>16)+o|0;j+=(p^o^m)+n[10]-1094730640|0;j=(j<<23|j>>>9)+p|0;m+=(j^p^o)+n[13]+681279174|0; 19 | m=(m<<4|m>>>28)+j|0;o+=(m^j^p)+n[0]-358537222|0;o=(o<<11|o>>>21)+m|0;p+=(o^m^j)+n[3]-722521979|0;p=(p<<16|p>>>16)+o|0;j+=(p^o^m)+n[6]+76029189|0; 20 | j=(j<<23|j>>>9)+p|0;m+=(j^p^o)+n[9]-640364487|0;m=(m<<4|m>>>28)+j|0;o+=(m^j^p)+n[12]-421815835|0;o=(o<<11|o>>>21)+m|0;p+=(o^m^j)+n[15]+530742520|0; 21 | p=(p<<16|p>>>16)+o|0;j+=(p^o^m)+n[2]-995338651|0;j=(j<<23|j>>>9)+p|0;m+=(p^(j|~o))+n[0]-198630844|0;m=(m<<6|m>>>26)+j|0;o+=(j^(m|~p))+n[7]+1126891415|0; 22 | o=(o<<10|o>>>22)+m|0;p+=(m^(o|~j))+n[14]-1416354905|0;p=(p<<15|p>>>17)+o|0;j+=(o^(p|~m))+n[5]-57434055|0;j=(j<<21|j>>>11)+p|0; 23 | m+=(p^(j|~o))+n[12]+1700485571|0;m=(m<<6|m>>>26)+j|0;o+=(j^(m|~p))+n[3]-1894986606|0;o=(o<<10|o>>>22)+m|0;p+=(m^(o|~j))+n[10]-1051523|0; 24 | p=(p<<15|p>>>17)+o|0;j+=(o^(p|~m))+n[1]-2054922799|0;j=(j<<21|j>>>11)+p|0;m+=(p^(j|~o))+n[8]+1873313359|0;m=(m<<6|m>>>26)+j|0; 25 | o+=(j^(m|~p))+n[15]-30611744|0;o=(o<<10|o>>>22)+m|0;p+=(m^(o|~j))+n[6]-1560198380|0;p=(p<<15|p>>>17)+o|0;j+=(o^(p|~m))+n[13]+1309151649|0; 26 | j=(j<<21|j>>>11)+p|0;m+=(p^(j|~o))+n[4]-145523070|0;m=(m<<6|m>>>26)+j|0;o+=(j^(m|~p))+n[11]-1120210379|0;o=(o<<10|o>>>22)+m|0; 27 | p+=(m^(o|~j))+n[2]+718787259|0;p=(p<<15|p>>>17)+o|0;j+=(o^(p|~m))+n[9]-343485551|0;j=(j<<21|j>>>11)+p|0;l[0]=m+l[0]|0;l[1]=j+l[1]|0; 28 | l[2]=p+l[2]|0;l[3]=o+l[3]|0};var e="0123456789abcdef";var d=[];var c=function(k){var q=e;var o=d;var r,p,l;for(var m=0;m<4; 29 | m++){p=m*8;r=k[m];for(l=0;l<8;l+=2){o[p+1+l]=q.charAt(r&15);r>>>=4;o[p+0+l]=q.charAt(r&15);r>>>=4}}return o.join("")};var i=function(){this._dataLength=0; 30 | this._state=new Int32Array(4);this._buffer=new ArrayBuffer(68);this._bufferLength=0;this._buffer8=new Uint8Array(this._buffer,0,68); 31 | this._buffer32=new Uint32Array(this._buffer,0,17);this.start()};var a=new Int32Array([1732584193,-271733879,-1732584194,271733878]); 32 | var h=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);i.prototype.appendStr=function(n){var k=this._buffer8;var j=this._buffer32; 33 | var o=this._bufferLength;var m;for(var l=0;l>>6)+192; 34 | k[o++]=m&63|128}else{if(m<55296||m>56319){k[o++]=(m>>>12)+224;k[o++]=(m>>>6&63)|128;k[o++]=(m&63)|128}else{m=((m-55296)*1024)+(n.charCodeAt(++l)-56320)+65536; 35 | if(m>1114111){throw"Unicode standard supports code points up to U+10FFFF"}k[o++]=(m>>>18)+240;k[o++]=(m>>>12&63)|128;k[o++]=(m>>>6&63)|128; 36 | k[o++]=(m&63)|128}}}if(o>=64){this._dataLength+=64;b(this._state,j);o-=64;j[0]=j[16]}}this._bufferLength=o;return this};i.prototype.appendAsciiStr=function(o){var l=this._buffer8; 37 | var k=this._buffer32;var p=this._bufferLength;var n,m=0;for(;;){n=Math.min(o.length-m,64-p);while(n--){l[p++]=o.charCodeAt(m++) 38 | }if(p<64){break}this._dataLength+=64;b(this._state,k);p=0}this._bufferLength=p;return this};i.prototype.appendByteArray=function(m){var l=this._buffer8; 39 | var k=this._buffer32;var p=this._bufferLength;var o,n=0;for(;;){o=Math.min(m.length-n,64-p);while(o--){l[p++]=m[n++]}if(p<64){break 40 | }this._dataLength+=64;b(this._state,k);p=0}this._bufferLength=p;return this};i.prototype.start=function(){this._dataLength=0; 41 | this._bufferLength=0;this._state.set(a);return this};i.prototype.end=function(p){var q=this._bufferLength;this._dataLength+=q; 42 | var r=this._buffer8;r[q]=128;r[q+1]=r[q+2]=r[q+3]=0;var k=this._buffer32;var m=(q>>2)+1;k.set(h.subarray(m),m);if(q>55){b(this._state,k); 43 | k.set(h)}var j=this._dataLength*8;if(j<=4294967295){k[14]=j}else{var n=j.toString(16).match(/(.*?)(.{0,8})$/);var o=parseInt(n[2],16); 44 | var l=parseInt(n[1],16)||0;k[14]=o;k[15]=l}b(this._state,k);return !!p?this._state:c(this._state)};var f=new i();i.hashStr=function(k,j){return f.start().appendStr(k).end(j) 45 | };i.hashAsciiStr=function(k,j){return f.start().appendAsciiStr(k).end(j)};if(i.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"){console.error("YaMD5> this javascript engine does not support YaMD5. Sorry.") 46 | }if(typeof g==="object"){g.YaMD5=i}return i})(this); -------------------------------------------------------------------------------- /hash-implementations/md5/myers.js: -------------------------------------------------------------------------------- 1 | function md5cycle(x, k) { 2 | var a = x[0], b = x[1], c = x[2], d = x[3]; 3 | 4 | a = ff(a, b, c, d, k[0], 7, -680876936); 5 | d = ff(d, a, b, c, k[1], 12, -389564586); 6 | c = ff(c, d, a, b, k[2], 17, 606105819); 7 | b = ff(b, c, d, a, k[3], 22, -1044525330); 8 | a = ff(a, b, c, d, k[4], 7, -176418897); 9 | d = ff(d, a, b, c, k[5], 12, 1200080426); 10 | c = ff(c, d, a, b, k[6], 17, -1473231341); 11 | b = ff(b, c, d, a, k[7], 22, -45705983); 12 | a = ff(a, b, c, d, k[8], 7, 1770035416); 13 | d = ff(d, a, b, c, k[9], 12, -1958414417); 14 | c = ff(c, d, a, b, k[10], 17, -42063); 15 | b = ff(b, c, d, a, k[11], 22, -1990404162); 16 | a = ff(a, b, c, d, k[12], 7, 1804603682); 17 | d = ff(d, a, b, c, k[13], 12, -40341101); 18 | c = ff(c, d, a, b, k[14], 17, -1502002290); 19 | b = ff(b, c, d, a, k[15], 22, 1236535329); 20 | 21 | a = gg(a, b, c, d, k[1], 5, -165796510); 22 | d = gg(d, a, b, c, k[6], 9, -1069501632); 23 | c = gg(c, d, a, b, k[11], 14, 643717713); 24 | b = gg(b, c, d, a, k[0], 20, -373897302); 25 | a = gg(a, b, c, d, k[5], 5, -701558691); 26 | d = gg(d, a, b, c, k[10], 9, 38016083); 27 | c = gg(c, d, a, b, k[15], 14, -660478335); 28 | b = gg(b, c, d, a, k[4], 20, -405537848); 29 | a = gg(a, b, c, d, k[9], 5, 568446438); 30 | d = gg(d, a, b, c, k[14], 9, -1019803690); 31 | c = gg(c, d, a, b, k[3], 14, -187363961); 32 | b = gg(b, c, d, a, k[8], 20, 1163531501); 33 | a = gg(a, b, c, d, k[13], 5, -1444681467); 34 | d = gg(d, a, b, c, k[2], 9, -51403784); 35 | c = gg(c, d, a, b, k[7], 14, 1735328473); 36 | b = gg(b, c, d, a, k[12], 20, -1926607734); 37 | 38 | a = hh(a, b, c, d, k[5], 4, -378558); 39 | d = hh(d, a, b, c, k[8], 11, -2022574463); 40 | c = hh(c, d, a, b, k[11], 16, 1839030562); 41 | b = hh(b, c, d, a, k[14], 23, -35309556); 42 | a = hh(a, b, c, d, k[1], 4, -1530992060); 43 | d = hh(d, a, b, c, k[4], 11, 1272893353); 44 | c = hh(c, d, a, b, k[7], 16, -155497632); 45 | b = hh(b, c, d, a, k[10], 23, -1094730640); 46 | a = hh(a, b, c, d, k[13], 4, 681279174); 47 | d = hh(d, a, b, c, k[0], 11, -358537222); 48 | c = hh(c, d, a, b, k[3], 16, -722521979); 49 | b = hh(b, c, d, a, k[6], 23, 76029189); 50 | a = hh(a, b, c, d, k[9], 4, -640364487); 51 | d = hh(d, a, b, c, k[12], 11, -421815835); 52 | c = hh(c, d, a, b, k[15], 16, 530742520); 53 | b = hh(b, c, d, a, k[2], 23, -995338651); 54 | 55 | a = ii(a, b, c, d, k[0], 6, -198630844); 56 | d = ii(d, a, b, c, k[7], 10, 1126891415); 57 | c = ii(c, d, a, b, k[14], 15, -1416354905); 58 | b = ii(b, c, d, a, k[5], 21, -57434055); 59 | a = ii(a, b, c, d, k[12], 6, 1700485571); 60 | d = ii(d, a, b, c, k[3], 10, -1894986606); 61 | c = ii(c, d, a, b, k[10], 15, -1051523); 62 | b = ii(b, c, d, a, k[1], 21, -2054922799); 63 | a = ii(a, b, c, d, k[8], 6, 1873313359); 64 | d = ii(d, a, b, c, k[15], 10, -30611744); 65 | c = ii(c, d, a, b, k[6], 15, -1560198380); 66 | b = ii(b, c, d, a, k[13], 21, 1309151649); 67 | a = ii(a, b, c, d, k[4], 6, -145523070); 68 | d = ii(d, a, b, c, k[11], 10, -1120210379); 69 | c = ii(c, d, a, b, k[2], 15, 718787259); 70 | b = ii(b, c, d, a, k[9], 21, -343485551); 71 | 72 | x[0] = add32(a, x[0]); 73 | x[1] = add32(b, x[1]); 74 | x[2] = add32(c, x[2]); 75 | x[3] = add32(d, x[3]); 76 | 77 | } 78 | 79 | function cmn(q, a, b, x, s, t) { 80 | a = add32(add32(a, q), add32(x, t)); 81 | return add32((a << s) | (a >>> (32 - s)), b); 82 | } 83 | 84 | function ff(a, b, c, d, x, s, t) { 85 | return cmn((b & c) | ((~b) & d), a, b, x, s, t); 86 | } 87 | 88 | function gg(a, b, c, d, x, s, t) { 89 | return cmn((b & d) | (c & (~d)), a, b, x, s, t); 90 | } 91 | 92 | function hh(a, b, c, d, x, s, t) { 93 | return cmn(b ^ c ^ d, a, b, x, s, t); 94 | } 95 | 96 | function ii(a, b, c, d, x, s, t) { 97 | return cmn(c ^ (b | (~d)), a, b, x, s, t); 98 | } 99 | 100 | function md51(s) { 101 | txt = ''; 102 | var n = s.length, 103 | state = [1732584193, -271733879, -1732584194, 271733878], i; 104 | for (i=64; i<=s.length; i+=64) { 105 | md5cycle(state, md5blk(s.substring(i-64, i))); 106 | } 107 | s = s.substring(i-64); 108 | var tail = [0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0]; 109 | for (i=0; i>2] |= s.charCodeAt(i) << ((i%4) << 3); 111 | tail[i>>2] |= 0x80 << ((i%4) << 3); 112 | if (i > 55) { 113 | md5cycle(state, tail); 114 | for (i=0; i<16; i++) tail[i] = 0; 115 | } 116 | tail[14] = n*8; 117 | md5cycle(state, tail); 118 | return state; 119 | } 120 | 121 | /* there needs to be support for Unicode here, 122 | * unless we pretend that we can redefine the MD-5 123 | * algorithm for multi-byte characters (perhaps 124 | * by adding every four 16-bit characters and 125 | * shortening the sum to 32 bits). Otherwise 126 | * I suggest performing MD-5 as if every character 127 | * was two bytes--e.g., 0040 0025 = @%--but then 128 | * how will an ordinary MD-5 sum be matched? 129 | * There is no way to standardize text to something 130 | * like UTF-8 before transformation; speed cost is 131 | * utterly prohibitive. The JavaScript standard 132 | * itself needs to look at this: it should start 133 | * providing access to strings as preformed UTF-8 134 | * 8-bit unsigned value arrays. 135 | */ 136 | function md5blk(s) { /* I figured global was faster. */ 137 | var md5blks = [], i; /* Andy King said do it this way. */ 138 | for (i=0; i<64; i+=4) { 139 | md5blks[i>>2] = s.charCodeAt(i) 140 | + (s.charCodeAt(i+1) << 8) 141 | + (s.charCodeAt(i+2) << 16) 142 | + (s.charCodeAt(i+3) << 24); 143 | } 144 | return md5blks; 145 | } 146 | 147 | var hex_chr = '0123456789abcdef'.split(''); 148 | 149 | function rhex(n) 150 | { 151 | var s='', j=0; 152 | for(; j<4; j++) 153 | s += hex_chr[(n >> (j * 8 + 4)) & 0x0F] 154 | + hex_chr[(n >> (j * 8)) & 0x0F]; 155 | return s; 156 | } 157 | 158 | function hex(x) { 159 | for (var i=0; i> 16) + (y >> 16) + (lsw >> 16); 182 | return (msw << 16) | (lsw & 0xFFFF); 183 | } 184 | } 185 | --------------------------------------------------------------------------------