summaryrefslogtreecommitdiffstats
path: root/node_modules/minimalistic-crypto-utils
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/minimalistic-crypto-utils')
-rw-r--r--node_modules/minimalistic-crypto-utils/.npmignore2
-rw-r--r--node_modules/minimalistic-crypto-utils/.travis.yml11
-rw-r--r--node_modules/minimalistic-crypto-utils/README.md47
-rw-r--r--node_modules/minimalistic-crypto-utils/lib/utils.js58
-rw-r--r--node_modules/minimalistic-crypto-utils/package.json56
-rw-r--r--node_modules/minimalistic-crypto-utils/test/utils-test.js28
6 files changed, 0 insertions, 202 deletions
diff --git a/node_modules/minimalistic-crypto-utils/.npmignore b/node_modules/minimalistic-crypto-utils/.npmignore
deleted file mode 100644
index 1ca9571..0000000
--- a/node_modules/minimalistic-crypto-utils/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-node_modules/
-npm-debug.log
diff --git a/node_modules/minimalistic-crypto-utils/.travis.yml b/node_modules/minimalistic-crypto-utils/.travis.yml
deleted file mode 100644
index ce24b7a..0000000
--- a/node_modules/minimalistic-crypto-utils/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-sudo: false
-
-language: node_js
-
-node_js:
- - "4"
- - "6"
- - "stable"
-
-script:
- - npm test
diff --git a/node_modules/minimalistic-crypto-utils/README.md b/node_modules/minimalistic-crypto-utils/README.md
deleted file mode 100644
index 9e58eba..0000000
--- a/node_modules/minimalistic-crypto-utils/README.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# minimalistic-crypto-utils
-[![Build Status](https://secure.travis-ci.org/indutny/minimalistic-crypto-utils.svg)](http://travis-ci.org/indutny/minimalistic-crypto-utils)
-[![NPM version](https://badge.fury.io/js/minimalistic-crypto-utils.svg)](http://badge.fury.io/js/minimalistic-crypto-utils)
-
-Very minimal utils that are required in order to write reasonable JS-only
-crypto module.
-
-## Usage
-
-```js
-const utils = require('minimalistic-crypto-utils');
-
-utils.toArray('abcd', 'hex');
-utils.encode([ 1, 2, 3, 4 ], 'hex');
-utils.toHex([ 1, 2, 3, 4 ]);
-```
-
-#### LICENSE
-
-This software is licensed under the MIT License.
-
-Copyright Fedor Indutny, 2017.
-
-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.
-
-[0]: http://tools.ietf.org/html/rfc6979
-[1]: https://github.com/indutny/bn.js
-[2]: https://github.com/indutny/hash.js
-[3]: https://github.com/bitchan/eccrypto
-[4]: https://github.com/wanderer/secp256k1-node
diff --git a/node_modules/minimalistic-crypto-utils/lib/utils.js b/node_modules/minimalistic-crypto-utils/lib/utils.js
deleted file mode 100644
index cd48daf..0000000
--- a/node_modules/minimalistic-crypto-utils/lib/utils.js
+++ /dev/null
@@ -1,58 +0,0 @@
-'use strict';
-
-var utils = exports;
-
-function toArray(msg, enc) {
- if (Array.isArray(msg))
- return msg.slice();
- if (!msg)
- return [];
- var res = [];
- if (typeof msg !== 'string') {
- for (var i = 0; i < msg.length; i++)
- res[i] = msg[i] | 0;
- return res;
- }
- if (enc === 'hex') {
- msg = msg.replace(/[^a-z0-9]+/ig, '');
- if (msg.length % 2 !== 0)
- msg = '0' + msg;
- for (var i = 0; i < msg.length; i += 2)
- res.push(parseInt(msg[i] + msg[i + 1], 16));
- } else {
- for (var i = 0; i < msg.length; i++) {
- var c = msg.charCodeAt(i);
- var hi = c >> 8;
- var lo = c & 0xff;
- if (hi)
- res.push(hi, lo);
- else
- res.push(lo);
- }
- }
- return res;
-}
-utils.toArray = toArray;
-
-function zero2(word) {
- if (word.length === 1)
- return '0' + word;
- else
- return word;
-}
-utils.zero2 = zero2;
-
-function toHex(msg) {
- var res = '';
- for (var i = 0; i < msg.length; i++)
- res += zero2(msg[i].toString(16));
- return res;
-}
-utils.toHex = toHex;
-
-utils.encode = function encode(arr, enc) {
- if (enc === 'hex')
- return toHex(arr);
- else
- return arr;
-};
diff --git a/node_modules/minimalistic-crypto-utils/package.json b/node_modules/minimalistic-crypto-utils/package.json
deleted file mode 100644
index 5c45a34..0000000
--- a/node_modules/minimalistic-crypto-utils/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "_from": "minimalistic-crypto-utils@^1.0.0",
- "_id": "minimalistic-crypto-utils@1.0.1",
- "_inBundle": false,
- "_integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
- "_location": "/minimalistic-crypto-utils",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "minimalistic-crypto-utils@^1.0.0",
- "name": "minimalistic-crypto-utils",
- "escapedName": "minimalistic-crypto-utils",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/elliptic",
- "/hmac-drbg"
- ],
- "_resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
- "_shasum": "f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a",
- "_spec": "minimalistic-crypto-utils@^1.0.0",
- "_where": "/home/pruss/Dev/3-minute-website/node_modules/elliptic",
- "author": {
- "name": "Fedor Indutny",
- "email": "fedor@indutny.com"
- },
- "bugs": {
- "url": "https://github.com/indutny/minimalistic-crypto-utils/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "Minimalistic tools for JS crypto modules",
- "devDependencies": {
- "mocha": "^3.2.0"
- },
- "homepage": "https://github.com/indutny/minimalistic-crypto-utils#readme",
- "keywords": [
- "minimalistic",
- "utils",
- "crypto"
- ],
- "license": "MIT",
- "main": "lib/utils.js",
- "name": "minimalistic-crypto-utils",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/indutny/minimalistic-crypto-utils.git"
- },
- "scripts": {
- "test": "mocha --reporter=spec test/*-test.js"
- },
- "version": "1.0.1"
-}
diff --git a/node_modules/minimalistic-crypto-utils/test/utils-test.js b/node_modules/minimalistic-crypto-utils/test/utils-test.js
deleted file mode 100644
index 3da812d..0000000
--- a/node_modules/minimalistic-crypto-utils/test/utils-test.js
+++ /dev/null
@@ -1,28 +0,0 @@
-'use strict';
-
-const assert = require('assert');
-const utils = require('../');
-
-describe('utils', () => {
- it('should convert to array', () => {
- assert.deepEqual(utils.toArray('1234', 'hex'), [ 0x12, 0x34 ]);
- assert.deepEqual(utils.toArray('1234'), [ 49, 50, 51, 52 ]);
- assert.deepEqual(utils.toArray('1234', 'utf8'), [ 49, 50, 51, 52 ]);
- assert.deepEqual(utils.toArray('\u1234234'), [ 18, 52, 50, 51, 52 ]);
- assert.deepEqual(utils.toArray([ 1, 2, 3, 4 ]), [ 1, 2, 3, 4 ]);
- });
-
- it('should zero pad byte to hex', () => {
- assert.equal(utils.zero2('0'), '00');
- assert.equal(utils.zero2('01'), '01');
- });
-
- it('should convert to hex', () => {
- assert.equal(utils.toHex([ 0, 1, 2, 3 ]), '00010203');
- });
-
- it('should encode', () => {
- assert.deepEqual(utils.encode([ 0, 1, 2, 3 ]), [ 0, 1, 2, 3 ]);
- assert.deepEqual(utils.encode([ 0, 1, 2, 3 ], 'hex'), '00010203');
- });
-});