client manager complete, client and client channels next

This commit is contained in:
Josh Burman
2019-03-07 20:19:13 -05:00
parent 97ed2476f4
commit 8fa7f98493
131 changed files with 10059 additions and 63 deletions

2
node_modules/buffer-equal-constant-time/.npmignore generated vendored Normal file
View File

@ -0,0 +1,2 @@
.*.sw[mnop]
node_modules/

4
node_modules/buffer-equal-constant-time/.travis.yml generated vendored Normal file
View File

@ -0,0 +1,4 @@
language: node_js
node_js:
- "0.11"
- "0.10"

12
node_modules/buffer-equal-constant-time/LICENSE.txt generated vendored Normal file
View File

@ -0,0 +1,12 @@
Copyright (c) 2013, GoInstant Inc., a salesforce.com company
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.
* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may 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 HOLDER OR 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.

50
node_modules/buffer-equal-constant-time/README.md generated vendored Normal file
View File

@ -0,0 +1,50 @@
# buffer-equal-constant-time
Constant-time `Buffer` comparison for node.js. Should work with browserify too.
[![Build Status](https://travis-ci.org/goinstant/buffer-equal-constant-time.png?branch=master)](https://travis-ci.org/goinstant/buffer-equal-constant-time)
```sh
npm install buffer-equal-constant-time
```
# Usage
```js
var bufferEq = require('buffer-equal-constant-time');
var a = new Buffer('asdf');
var b = new Buffer('asdf');
if (bufferEq(a,b)) {
// the same!
} else {
// different in at least one byte!
}
```
If you'd like to install an `.equal()` method onto the node.js `Buffer` and
`SlowBuffer` prototypes:
```js
require('buffer-equal-constant-time').install();
var a = new Buffer('asdf');
var b = new Buffer('asdf');
if (a.equal(b)) {
// the same!
} else {
// different in at least one byte!
}
```
To get rid of the installed `.equal()` method, call `.restore()`:
```js
require('buffer-equal-constant-time').restore();
```
# Legal
© 2013 GoInstant Inc., a salesforce.com company
Licensed under the BSD 3-clause license.

41
node_modules/buffer-equal-constant-time/index.js generated vendored Normal file
View File

@ -0,0 +1,41 @@
/*jshint node:true */
'use strict';
var Buffer = require('buffer').Buffer; // browserify
var SlowBuffer = require('buffer').SlowBuffer;
module.exports = bufferEq;
function bufferEq(a, b) {
// shortcutting on type is necessary for correctness
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
return false;
}
// buffer sizes should be well-known information, so despite this
// shortcutting, it doesn't leak any information about the *contents* of the
// buffers.
if (a.length !== b.length) {
return false;
}
var c = 0;
for (var i = 0; i < a.length; i++) {
/*jshint bitwise:false */
c |= a[i] ^ b[i]; // XOR
}
return c === 0;
}
bufferEq.install = function() {
Buffer.prototype.equal = SlowBuffer.prototype.equal = function equal(that) {
return bufferEq(this, that);
};
};
var origBufEqual = Buffer.prototype.equal;
var origSlowBufEqual = SlowBuffer.prototype.equal;
bufferEq.restore = function() {
Buffer.prototype.equal = origBufEqual;
SlowBuffer.prototype.equal = origSlowBufEqual;
};

55
node_modules/buffer-equal-constant-time/package.json generated vendored Normal file
View File

@ -0,0 +1,55 @@
{
"_from": "buffer-equal-constant-time@1.0.1",
"_id": "buffer-equal-constant-time@1.0.1",
"_inBundle": false,
"_integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=",
"_location": "/buffer-equal-constant-time",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "buffer-equal-constant-time@1.0.1",
"name": "buffer-equal-constant-time",
"escapedName": "buffer-equal-constant-time",
"rawSpec": "1.0.1",
"saveSpec": null,
"fetchSpec": "1.0.1"
},
"_requiredBy": [
"/jwa"
],
"_resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
"_shasum": "f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819",
"_spec": "buffer-equal-constant-time@1.0.1",
"_where": "/Users/josh.burman/Projects/braid/node_modules/jwa",
"author": {
"name": "GoInstant Inc., a salesforce.com company"
},
"bugs": {
"url": "https://github.com/goinstant/buffer-equal-constant-time/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Constant-time comparison of Buffers",
"devDependencies": {
"mocha": "~1.15.1"
},
"homepage": "https://github.com/goinstant/buffer-equal-constant-time#readme",
"keywords": [
"buffer",
"equal",
"constant-time",
"crypto"
],
"license": "BSD-3-Clause",
"main": "index.js",
"name": "buffer-equal-constant-time",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/goinstant/buffer-equal-constant-time.git"
},
"scripts": {
"test": "mocha test.js"
},
"version": "1.0.1"
}

42
node_modules/buffer-equal-constant-time/test.js generated vendored Normal file
View File

@ -0,0 +1,42 @@
/*jshint node:true */
'use strict';
var bufferEq = require('./index');
var assert = require('assert');
describe('buffer-equal-constant-time', function() {
var a = new Buffer('asdfasdf123456');
var b = new Buffer('asdfasdf123456');
var c = new Buffer('asdfasdf');
describe('bufferEq', function() {
it('says a == b', function() {
assert.strictEqual(bufferEq(a, b), true);
});
it('says a != c', function() {
assert.strictEqual(bufferEq(a, c), false);
});
});
describe('install/restore', function() {
before(function() {
bufferEq.install();
});
after(function() {
bufferEq.restore();
});
it('installed an .equal method', function() {
var SlowBuffer = require('buffer').SlowBuffer;
assert.ok(Buffer.prototype.equal);
assert.ok(SlowBuffer.prototype.equal);
});
it('infected existing Buffers', function() {
assert.strictEqual(a.equal(b), true);
assert.strictEqual(a.equal(c), false);
});
});
});