diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:01:11 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-14 05:02:09 +0200 |
commit | 363723fc84f7b8477592e0105aeb331ec9a017af (patch) | |
tree | 29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/randombytes | |
parent | 5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff) |
node_modules
Diffstat (limited to 'node_modules/randombytes')
-rw-r--r-- | node_modules/randombytes/.npmignore | 1 | ||||
-rw-r--r-- | node_modules/randombytes/.travis.yml | 4 | ||||
-rw-r--r-- | node_modules/randombytes/LICENSE | 21 | ||||
-rw-r--r-- | node_modules/randombytes/browser.js | 6 | ||||
-rw-r--r-- | node_modules/randombytes/package.json | 9 |
5 files changed, 34 insertions, 7 deletions
diff --git a/node_modules/randombytes/.npmignore b/node_modules/randombytes/.npmignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/node_modules/randombytes/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/node_modules/randombytes/.travis.yml b/node_modules/randombytes/.travis.yml index f8eebd870..69fdf7130 100644 --- a/node_modules/randombytes/.travis.yml +++ b/node_modules/randombytes/.travis.yml @@ -2,9 +2,9 @@ sudo: false language: node_js matrix: include: - - node_js: '0.10' + - node_js: '7' env: TEST_SUITE=test - - node_js: '0.12' + - node_js: '6' env: TEST_SUITE=test - node_js: '5' env: TEST_SUITE=test diff --git a/node_modules/randombytes/LICENSE b/node_modules/randombytes/LICENSE new file mode 100644 index 000000000..fea9d48a4 --- /dev/null +++ b/node_modules/randombytes/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 crypto-browserify + +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/randombytes/browser.js b/node_modules/randombytes/browser.js index 1aa3edcc7..9669903b8 100644 --- a/node_modules/randombytes/browser.js +++ b/node_modules/randombytes/browser.js @@ -4,6 +4,7 @@ function oldBrowser () { throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11') } +var Buffer = require('safe-buffer').Buffer var crypto = global.crypto || global.msCrypto if (crypto && crypto.getRandomValues) { @@ -23,8 +24,9 @@ function randomBytes (size, cb) { if (size > 0) { // getRandomValues fails on IE if size == 0 crypto.getRandomValues(rawBytes) } - // phantomjs doesn't like a buffer being passed here - var bytes = new Buffer(rawBytes.buffer) + + // XXX: phantomjs doesn't like a buffer being passed here + var bytes = Buffer.from(rawBytes.buffer) if (typeof cb === 'function') { return process.nextTick(function () { diff --git a/node_modules/randombytes/package.json b/node_modules/randombytes/package.json index 0bd60318d..87ef69ae4 100644 --- a/node_modules/randombytes/package.json +++ b/node_modules/randombytes/package.json @@ -1,6 +1,6 @@ { "name": "randombytes", - "version": "2.0.3", + "version": "2.0.5", "description": "random bytes from browserify stand alone", "main": "index.js", "scripts": { @@ -25,9 +25,12 @@ "browser": "browser.js", "devDependencies": { "phantomjs": "^1.9.9", - "standard": "^3.3.0", + "standard": "^10.0.2", "tap-spec": "^2.1.2", - "tape": "^3.0.3", + "tape": "^4.6.3", "zuul": "^3.7.2" + }, + "dependencies": { + "safe-buffer": "^5.1.0" } } |