summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cryptiles
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/cryptiles')
-rw-r--r--deps/npm/node_modules/cryptiles/.npmignore17
-rwxr-xr-xdeps/npm/node_modules/cryptiles/.travis.yml7
-rwxr-xr-xdeps/npm/node_modules/cryptiles/LICENSE28
-rw-r--r--deps/npm/node_modules/cryptiles/README.md16
-rwxr-xr-xdeps/npm/node_modules/cryptiles/lib/index.js66
-rwxr-xr-xdeps/npm/node_modules/cryptiles/package.json59
-rwxr-xr-xdeps/npm/node_modules/cryptiles/test/index.js102
7 files changed, 0 insertions, 295 deletions
diff --git a/deps/npm/node_modules/cryptiles/.npmignore b/deps/npm/node_modules/cryptiles/.npmignore
deleted file mode 100644
index b0939eabe3..0000000000
--- a/deps/npm/node_modules/cryptiles/.npmignore
+++ /dev/null
@@ -1,17 +0,0 @@
-.idea
-*.iml
-npm-debug.log
-dump.rdb
-node_modules
-results.tap
-results.xml
-npm-shrinkwrap.json
-config.json
-.DS_Store
-*/.DS_Store
-*/*/.DS_Store
-._*
-*/._*
-*/*/._*
-coverage.*
-lib-cov
diff --git a/deps/npm/node_modules/cryptiles/.travis.yml b/deps/npm/node_modules/cryptiles/.travis.yml
deleted file mode 100755
index 7a64dd2210..0000000000
--- a/deps/npm/node_modules/cryptiles/.travis.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-language: node_js
-
-node_js:
- - 0.10
- - 4.0
-
-sudo: false
diff --git a/deps/npm/node_modules/cryptiles/LICENSE b/deps/npm/node_modules/cryptiles/LICENSE
deleted file mode 100755
index cda44736af..0000000000
--- a/deps/npm/node_modules/cryptiles/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2014, Eran Hammer and other contributors.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * The names of any contributors may not be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- * * *
-
-The complete list of contributors can be found at: https://github.com/hueniverse/cryptiles/graphs/contributors
diff --git a/deps/npm/node_modules/cryptiles/README.md b/deps/npm/node_modules/cryptiles/README.md
deleted file mode 100644
index 4008305017..0000000000
--- a/deps/npm/node_modules/cryptiles/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-cryptiles
-=========
-
-General purpose crypto utilities
-
-[![Build Status](https://secure.travis-ci.org/hapijs/cryptiles.png)](http://travis-ci.org/hapijs/cryptiles)
-
-Lead Maintainer - [C J Silverio](https://github.com/ceejbot)
-
-## Methods
-
-### `randomString(<Number> size)`
-Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string.
-
-### `fixedTimeComparison(<String> a, <String> b)`
-Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match). Returns `true` if the strings match, `false` if they differ.
diff --git a/deps/npm/node_modules/cryptiles/lib/index.js b/deps/npm/node_modules/cryptiles/lib/index.js
deleted file mode 100755
index c8a046d743..0000000000
--- a/deps/npm/node_modules/cryptiles/lib/index.js
+++ /dev/null
@@ -1,66 +0,0 @@
-// Load modules
-
-var Crypto = require('crypto');
-var Boom = require('boom');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Generate a cryptographically strong pseudo-random data
-
-exports.randomString = function (size) {
-
- var buffer = exports.randomBits((size + 1) * 6);
- if (buffer instanceof Error) {
- return buffer;
- }
-
- var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/\=/g, '');
- return string.slice(0, size);
-};
-
-
-exports.randomBits = function (bits) {
-
- if (!bits ||
- bits < 0) {
-
- return Boom.internal('Invalid random bits count');
- }
-
- var bytes = Math.ceil(bits / 8);
- try {
- return Crypto.randomBytes(bytes);
- }
- catch (err) {
- return Boom.internal('Failed generating random bits: ' + err.message);
- }
-};
-
-
-// Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match)
-
-exports.fixedTimeComparison = function (a, b) {
-
- if (typeof a !== 'string' ||
- typeof b !== 'string') {
-
- return false;
- }
-
- var mismatch = (a.length === b.length ? 0 : 1);
- if (mismatch) {
- b = a;
- }
-
- for (var i = 0, il = a.length; i < il; ++i) {
- var ac = a.charCodeAt(i);
- var bc = b.charCodeAt(i);
- mismatch |= (ac ^ bc);
- }
-
- return (mismatch === 0);
-};
diff --git a/deps/npm/node_modules/cryptiles/package.json b/deps/npm/node_modules/cryptiles/package.json
deleted file mode 100755
index 28c6ad3610..0000000000
--- a/deps/npm/node_modules/cryptiles/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "cryptiles@2.x.x",
- "_id": "cryptiles@2.0.5",
- "_inBundle": false,
- "_integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
- "_location": "/cryptiles",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "cryptiles@2.x.x",
- "name": "cryptiles",
- "escapedName": "cryptiles",
- "rawSpec": "2.x.x",
- "saveSpec": null,
- "fetchSpec": "2.x.x"
- },
- "_requiredBy": [
- "/hawk"
- ],
- "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
- "_shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8",
- "_spec": "cryptiles@2.x.x",
- "_where": "/Users/zkat/Documents/code/work/npm/node_modules/hawk",
- "bugs": {
- "url": "https://github.com/hapijs/cryptiles/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "boom": "2.x.x"
- },
- "deprecated": false,
- "description": "General purpose crypto utilities",
- "devDependencies": {
- "code": "1.x.x",
- "lab": "5.x.x"
- },
- "engines": {
- "node": ">=0.10.40"
- },
- "homepage": "https://github.com/hapijs/cryptiles#readme",
- "keywords": [
- "cryptography",
- "security",
- "utilites"
- ],
- "license": "BSD-3-Clause",
- "main": "lib/index.js",
- "name": "cryptiles",
- "repository": {
- "type": "git",
- "url": "git://github.com/hapijs/cryptiles.git"
- },
- "scripts": {
- "test": "lab -a code -t 100 -L",
- "test-cov-html": "lab -a code -r html -o coverage.html"
- },
- "version": "2.0.5"
-}
diff --git a/deps/npm/node_modules/cryptiles/test/index.js b/deps/npm/node_modules/cryptiles/test/index.js
deleted file mode 100755
index 170393f9b5..0000000000
--- a/deps/npm/node_modules/cryptiles/test/index.js
+++ /dev/null
@@ -1,102 +0,0 @@
-// Load modules
-
-var Code = require('code');
-var Cryptiles = require('..');
-var Lab = require('lab');
-
-
-// Declare internals
-
-var internals = {};
-
-
-// Test shortcuts
-
-var lab = exports.lab = Lab.script();
-var describe = lab.describe;
-var it = lab.it;
-var expect = Code.expect;
-
-
-describe('randomString()', function () {
-
- it('should generate the right length string', function (done) {
-
- for (var i = 1; i <= 1000; ++i) {
- expect(Cryptiles.randomString(i).length).to.equal(i);
- }
-
- done();
- });
-
- it('returns an error on invalid bits size', function (done) {
-
- expect(Cryptiles.randomString(99999999999999999999).message).to.match(/Failed generating random bits/);
- done();
- });
-});
-
-describe('randomBits()', function () {
-
- it('returns an error on invalid input', function (done) {
-
- expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count');
- done();
- });
-});
-
-describe('fixedTimeComparison()', function () {
-
- var a = Cryptiles.randomString(50000);
- var b = Cryptiles.randomString(150000);
-
- it('should take the same amount of time comparing different string sizes', function (done) {
-
- var now = Date.now();
- Cryptiles.fixedTimeComparison(b, a);
- var t1 = Date.now() - now;
-
- now = Date.now();
- Cryptiles.fixedTimeComparison(b, b);
- var t2 = Date.now() - now;
-
- expect(t2 - t1).to.be.within(-20, 20);
- done();
- });
-
- it('should return true for equal strings', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true);
- done();
- });
-
- it('should return false for different strings (size, a < b)', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false);
- done();
- });
-
- it('should return false for different strings (size, a > b)', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false);
- done();
- });
-
- it('should return false for different strings (size, a = b)', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false);
- done();
- });
-
- it('should return false when not a string', function (done) {
-
- expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false);
- done();
- });
-
- it('should return false when not a string (left)', function (done) {
-
- expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false);
- done();
- });
-});