diff options
author | Rebecca Turner <me@re-becca.org> | 2015-09-10 01:12:48 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-09-10 23:47:22 +0300 |
commit | 9d6488cb5ceafb93d500cdad4d2667ebce42ddf5 (patch) | |
tree | fc91d886b2cc9a4fb2faf3865220557f6deed8bc /node_modules/cryptiles | |
parent | 191201236bd421712fa236c37c41fdfc86c3b331 (diff) |
cryptiles@2.0.5
Diffstat (limited to 'node_modules/cryptiles')
-rw-r--r-- | node_modules/cryptiles/.npmignore | 1 | ||||
-rwxr-xr-x | node_modules/cryptiles/.travis.yml | 2 | ||||
-rwxr-xr-x | node_modules/cryptiles/Makefile | 9 | ||||
-rw-r--r-- | node_modules/cryptiles/README.md | 2 | ||||
-rwxr-xr-x | node_modules/cryptiles/index.js | 1 | ||||
-rw-r--r-- | node_modules/cryptiles/package.json | 52 | ||||
-rwxr-xr-x | node_modules/cryptiles/test/index.js | 120 |
7 files changed, 86 insertions, 101 deletions
diff --git a/node_modules/cryptiles/.npmignore b/node_modules/cryptiles/.npmignore index 77ba16cb0..b0939eabe 100644 --- a/node_modules/cryptiles/.npmignore +++ b/node_modules/cryptiles/.npmignore @@ -15,4 +15,3 @@ config.json */*/._* coverage.* lib-cov - diff --git a/node_modules/cryptiles/.travis.yml b/node_modules/cryptiles/.travis.yml index 047f7e3d5..7a64dd221 100755 --- a/node_modules/cryptiles/.travis.yml +++ b/node_modules/cryptiles/.travis.yml @@ -2,4 +2,6 @@ language: node_js node_js: - 0.10 + - 4.0 +sudo: false diff --git a/node_modules/cryptiles/Makefile b/node_modules/cryptiles/Makefile deleted file mode 100755 index 3a89298fb..000000000 --- a/node_modules/cryptiles/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -test: - node node_modules/lab/bin/lab -test-cov: - node node_modules/lab/bin/lab -t 100 -test-cov-html: - node node_modules/lab/bin/lab -r html -o coverage.html - -.PHONY: test test-cov test-cov-html - diff --git a/node_modules/cryptiles/README.md b/node_modules/cryptiles/README.md index be943f8ec..400830501 100644 --- a/node_modules/cryptiles/README.md +++ b/node_modules/cryptiles/README.md @@ -5,6 +5,8 @@ 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)` diff --git a/node_modules/cryptiles/index.js b/node_modules/cryptiles/index.js deleted file mode 100755 index 4cc88b358..000000000 --- a/node_modules/cryptiles/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib');
\ No newline at end of file diff --git a/node_modules/cryptiles/package.json b/node_modules/cryptiles/package.json index e33a11fb5..75d997644 100644 --- a/node_modules/cryptiles/package.json +++ b/node_modules/cryptiles/package.json @@ -6,14 +6,15 @@ ] ], "_from": "cryptiles@>=2.0.0 <3.0.0", - "_id": "cryptiles@2.0.4", + "_id": "cryptiles@2.0.5", "_inCache": true, "_location": "/cryptiles", + "_nodeVersion": "4.0.0", "_npmUser": { - "email": "eran@hueniverse.com", + "email": "eran@hammer.io", "name": "hueniverse" }, - "_npmVersion": "1.4.23", + "_npmVersion": "2.14.2", "_phantomChildren": {}, "_requested": { "name": "cryptiles", @@ -24,65 +25,62 @@ "type": "range" }, "_requiredBy": [ + "/follow/hawk", "/hawk" ], - "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz", - "_shasum": "09ea1775b9e1c7de7e60a99d42ab6f08ce1a1285", + "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz", + "_shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8", "_shrinkwrap": null, "_spec": "cryptiles@2.x.x", "_where": "/Users/rebecca/code/npm/node_modules/hawk", - "author": { - "email": "eran@hammer.io", - "name": "Eran Hammer", - "url": "http://hueniverse.com" - }, "bugs": { "url": "https://github.com/hapijs/cryptiles/issues" }, - "contributors": [], "dependencies": { "boom": "2.x.x" }, "description": "General purpose crypto utilities", "devDependencies": { - "lab": "4.x.x" + "code": "1.x.x", + "lab": "5.x.x" }, "directories": {}, "dist": { - "shasum": "09ea1775b9e1c7de7e60a99d42ab6f08ce1a1285", - "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz" + "shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8", + "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz" }, "engines": { - "node": ">=0.8.0" + "node": ">=0.10.40" }, - "gitHead": "944263dbb628b9b3da542d35600d587f861eeaf0", - "homepage": "https://github.com/hapijs/cryptiles", + "gitHead": "9bc5a852f01cd51e615814e1cb255fe2df810649", + "homepage": "https://github.com/hapijs/cryptiles#readme", + "installable": true, "keywords": [ "cryptography", "security", "utilites" ], - "licenses": [ - { - "type": "BSD", - "url": "http://github.com/hapijs/cryptiles/raw/master/LICENSE" - } - ], - "main": "index", + "license": "BSD-3-Clause", + "main": "lib/index.js", "maintainers": [ { "name": "hueniverse", "email": "eran@hueniverse.com" + }, + { + "name": "ceejbot", + "email": "ceejceej@gmail.com" } ], "name": "cryptiles", "optionalDependencies": {}, "repository": { "type": "git", - "url": "git://github.com/hapijs/cryptiles" + "url": "git://github.com/hapijs/cryptiles.git" }, "scripts": { - "test": "make test-cov" + "test": "lab -a code -t 100 -L", + "test-cov-html": "lab -a code -r html -o coverage.html" }, - "version": "2.0.4" + "version": "2.0.5" } diff --git a/node_modules/cryptiles/test/index.js b/node_modules/cryptiles/test/index.js index 3340141a2..170393f9b 100755 --- a/node_modules/cryptiles/test/index.js +++ b/node_modules/cryptiles/test/index.js @@ -1,7 +1,8 @@ // Load modules +var Code = require('code'); +var Cryptiles = require('..'); var Lab = require('lab'); -var Cryptiles = require('../lib'); // Declare internals @@ -12,97 +13,90 @@ var internals = {}; // Test shortcuts var lab = exports.lab = Lab.script(); -var before = lab.before; -var after = lab.after; -var describe = lab.experiment; -var it = lab.test; -var expect = Lab.expect; +var describe = lab.describe; +var it = lab.it; +var expect = Code.expect; -describe('Cryptiles', function () { +describe('randomString()', function () { - describe('#randomString', function () { + it('should generate the right length string', function (done) { - it('should generate the right length string', function (done) { + for (var i = 1; i <= 1000; ++i) { + expect(Cryptiles.randomString(i).length).to.equal(i); + } - for (var i = 1; i <= 1000; ++i) { - expect(Cryptiles.randomString(i).length).to.equal(i); - } - - done(); - }); + done(); + }); - it('returns an error on invalid bits size', function (done) { + it('returns an error on invalid bits size', function (done) { - expect(Cryptiles.randomString(99999999999999999999).message).to.equal('Failed generating random bits: Argument #1 must be number > 0'); - done(); - }); + expect(Cryptiles.randomString(99999999999999999999).message).to.match(/Failed generating random bits/); + done(); }); +}); - describe('#randomBits', function () { +describe('randomBits()', function () { - it('returns an error on invalid input', function (done) { + it('returns an error on invalid input', function (done) { - expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count'); - done(); - }); + expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count'); + done(); }); +}); - describe('#fixedTimeComparison', function () { +describe('fixedTimeComparison()', function () { - var a = Cryptiles.randomString(50000); - var b = Cryptiles.randomString(150000); + var a = Cryptiles.randomString(50000); + var b = Cryptiles.randomString(150000); - it('should take the same amount of time comparing different string sizes', function (done) { + 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; + 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; + now = Date.now(); + Cryptiles.fixedTimeComparison(b, b); + var t2 = Date.now() - now; - expect(t2 - t1).to.be.within(-20, 20); - done(); - }); + expect(t2 - t1).to.be.within(-20, 20); + done(); + }); - it('should return true for equal strings', function (done) { + it('should return true for equal strings', function (done) { - expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true); - done(); - }); + expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true); + done(); + }); - it('should return false for different strings (size, a < b)', function (done) { + it('should return false for different strings (size, a < b)', function (done) { - expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false); - done(); - }); + expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false); + done(); + }); - it('should return false for different strings (size, a > b)', function (done) { + it('should return false for different strings (size, a > b)', function (done) { - expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false); - done(); - }); + expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false); + done(); + }); - it('should return false for different strings (size, a = b)', function (done) { + it('should return false for different strings (size, a = b)', function (done) { - expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false); - done(); - }); + expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false); + done(); + }); - it('should return false when not a string', function (done) { + it('should return false when not a string', function (done) { - expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false); - done(); - }); + expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false); + done(); + }); - it('should return false when not a string (left)', function (done) { + it('should return false when not a string (left)', function (done) { - expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false); - done(); - }); + expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false); + done(); }); }); - - |