diff options
Diffstat (limited to 'node_modules/buffer-xor')
-rw-r--r-- | node_modules/buffer-xor/.npmignore | 1 | ||||
-rw-r--r-- | node_modules/buffer-xor/.travis.yml | 9 | ||||
-rw-r--r-- | node_modules/buffer-xor/LICENSE | 21 | ||||
-rw-r--r-- | node_modules/buffer-xor/README.md | 41 | ||||
-rw-r--r-- | node_modules/buffer-xor/index.js | 10 | ||||
-rw-r--r-- | node_modules/buffer-xor/inline.js | 1 | ||||
-rw-r--r-- | node_modules/buffer-xor/inplace.js | 9 | ||||
-rw-r--r-- | node_modules/buffer-xor/package.json | 64 | ||||
-rw-r--r-- | node_modules/buffer-xor/test/fixtures.json | 23 | ||||
-rw-r--r-- | node_modules/buffer-xor/test/index.js | 38 |
10 files changed, 0 insertions, 217 deletions
diff --git a/node_modules/buffer-xor/.npmignore b/node_modules/buffer-xor/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/buffer-xor/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/buffer-xor/.travis.yml b/node_modules/buffer-xor/.travis.yml deleted file mode 100644 index d9f695b..0000000 --- a/node_modules/buffer-xor/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -before_install: - - "npm install npm -g" -node_js: - - "0.12" -env: - - TEST_SUITE=standard - - TEST_SUITE=unit -script: "npm run-script $TEST_SUITE" diff --git a/node_modules/buffer-xor/LICENSE b/node_modules/buffer-xor/LICENSE deleted file mode 100644 index bba5218..0000000 --- a/node_modules/buffer-xor/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Daniel Cousens - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/buffer-xor/README.md b/node_modules/buffer-xor/README.md deleted file mode 100644 index 007f058..0000000 --- a/node_modules/buffer-xor/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# buffer-xor - -[](http://travis-ci.org/crypto-browserify/buffer-xor) -[](https://www.npmjs.org/package/buffer-xor) - -[](https://github.com/feross/standard) - -A simple module for bitwise-xor on buffers. - - -## Examples - -``` javascript -var xor = require("buffer-xor") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xor(a, b)) -// => <Buffer f0 0f> -``` - - -Or for those seeking those few extra cycles, perform the operation in place: - -``` javascript -var xorInplace = require("buffer-xor/inplace") -var a = new Buffer('00ff0f', 'hex') -var b = new Buffer('f0f0', 'hex') - -console.log(xorInplace(a, b)) -// => <Buffer f0 0f> -// NOTE: xorInplace will return the shorter slice of its parameters - -// See that a has been mutated -console.log(a) -// => <Buffer f0 0f 0f> -``` - - -## License [MIT](LICENSE) - diff --git a/node_modules/buffer-xor/index.js b/node_modules/buffer-xor/index.js deleted file mode 100644 index 85ee6f6..0000000 --- a/node_modules/buffer-xor/index.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = function xor (a, b) { - var length = Math.min(a.length, b.length) - var buffer = new Buffer(length) - - for (var i = 0; i < length; ++i) { - buffer[i] = a[i] ^ b[i] - } - - return buffer -} diff --git a/node_modules/buffer-xor/inline.js b/node_modules/buffer-xor/inline.js deleted file mode 100644 index 8797570..0000000 --- a/node_modules/buffer-xor/inline.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./inplace') diff --git a/node_modules/buffer-xor/inplace.js b/node_modules/buffer-xor/inplace.js deleted file mode 100644 index d71c172..0000000 --- a/node_modules/buffer-xor/inplace.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = function xorInplace (a, b) { - var length = Math.min(a.length, b.length) - - for (var i = 0; i < length; ++i) { - a[i] = a[i] ^ b[i] - } - - return a.slice(0, length) -} diff --git a/node_modules/buffer-xor/package.json b/node_modules/buffer-xor/package.json deleted file mode 100644 index 9db3684..0000000 --- a/node_modules/buffer-xor/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "buffer-xor@^1.0.3", - "_id": "buffer-xor@1.0.3", - "_inBundle": false, - "_integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "_location": "/buffer-xor", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "buffer-xor@^1.0.3", - "name": "buffer-xor", - "escapedName": "buffer-xor", - "rawSpec": "^1.0.3", - "saveSpec": null, - "fetchSpec": "^1.0.3" - }, - "_requiredBy": [ - "/browserify-aes" - ], - "_resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "_shasum": "26e61ed1422fb70dd42e6e36729ed51d855fe8d9", - "_spec": "buffer-xor@^1.0.3", - "_where": "/home/pruss/Dev/3-minute-website/node_modules/browserify-aes", - "author": { - "name": "Daniel Cousens" - }, - "bugs": { - "url": "https://github.com/crypto-browserify/buffer-xor/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A simple module for bitwise-xor on buffers", - "devDependencies": { - "mocha": "*", - "standard": "*" - }, - "homepage": "https://github.com/crypto-browserify/buffer-xor", - "keywords": [ - "bits", - "bitwise", - "buffer", - "buffer-xor", - "crypto", - "inline", - "math", - "memory", - "performance", - "xor" - ], - "license": "MIT", - "main": "index.js", - "name": "buffer-xor", - "repository": { - "type": "git", - "url": "git+https://github.com/crypto-browserify/buffer-xor.git" - }, - "scripts": { - "standard": "standard", - "test": "npm run-script unit", - "unit": "mocha" - }, - "version": "1.0.3" -} diff --git a/node_modules/buffer-xor/test/fixtures.json b/node_modules/buffer-xor/test/fixtures.json deleted file mode 100644 index 6f3431e..0000000 --- a/node_modules/buffer-xor/test/fixtures.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "a": "000f", - "b": "f0ff", - "expected": "f0f0" - }, - { - "a": "000f0f", - "b": "f0ff", - "mutated": "f0f00f", - "expected": "f0f0" - }, - { - "a": "000f", - "b": "f0ffff", - "expected": "f0f0" - }, - { - "a": "000000", - "b": "000000", - "expected": "000000" - } -] diff --git a/node_modules/buffer-xor/test/index.js b/node_modules/buffer-xor/test/index.js deleted file mode 100644 index 06eacab..0000000 --- a/node_modules/buffer-xor/test/index.js +++ /dev/null @@ -1,38 +0,0 @@ -/* global describe, it */ - -var assert = require('assert') -var xor = require('../') -var xorInplace = require('../inplace') -var fixtures = require('./fixtures') - -describe('xor', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xor(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a/b unchanged - assert.equal(a.toString('hex'), f.a) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) - -describe('xor/inplace', function () { - fixtures.forEach(function (f) { - it('returns ' + f.expected + ' for ' + f.a + '/' + f.b, function () { - var a = new Buffer(f.a, 'hex') - var b = new Buffer(f.b, 'hex') - var actual = xorInplace(a, b) - - assert.equal(actual.toString('hex'), f.expected) - - // a mutated, b unchanged - assert.equal(a.toString('hex'), f.mutated || f.expected) - assert.equal(b.toString('hex'), f.b) - }) - }) -}) |