aboutsummaryrefslogtreecommitdiff
path: root/node_modules/crypto-browserify
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/crypto-browserify')
-rw-r--r--node_modules/crypto-browserify/.travis.yml10
-rw-r--r--node_modules/crypto-browserify/README.md1
-rw-r--r--node_modules/crypto-browserify/index.js117
-rw-r--r--node_modules/crypto-browserify/package.json2
4 files changed, 71 insertions, 59 deletions
diff --git a/node_modules/crypto-browserify/.travis.yml b/node_modules/crypto-browserify/.travis.yml
index 1fe31b80a..8f7bb60c5 100644
--- a/node_modules/crypto-browserify/.travis.yml
+++ b/node_modules/crypto-browserify/.travis.yml
@@ -2,8 +2,6 @@ sudo: false
language: node_js
matrix:
include:
- - node_js: '0.10'
- env: TEST_SUITE=unit
- node_js: '0.11'
env: TEST_SUITE=unit
- node_js: '0.12'
@@ -15,15 +13,13 @@ matrix:
- node_js: '4'
env: TEST_SUITE=browser BROWSER_NAME=ie BROWSER_VERSION="10..latest"
- node_js: '4'
- env: TEST_SUITE=browser BROWSER_NAME=chrome BROWSER_VERSION="44..beta"
- - node_js: '4'
- env: TEST_SUITE=browser BROWSER_NAME=firefox BROWSER_VERSION="40..latest"
+ env: TEST_SUITE=browser BROWSER_NAME=chrome BROWSER_VERSION="-2..beta"
- node_js: '4'
- env: TEST_SUITE=browser BROWSER_NAME=iphone BROWSER_VERSION="8.0..latest"
+ env: TEST_SUITE=browser BROWSER_NAME=firefox BROWSER_VERSION="-2..latest"
- node_js: '4'
env: TEST_SUITE=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest"
- node_js: '4'
- env: TEST_SUITE=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
+ env: TEST_SUITE=browser BROWSER_NAME=android BROWSER_VERSION="5.0..latest"
script: "npm run-script $TEST_SUITE"
env:
global:
diff --git a/node_modules/crypto-browserify/README.md b/node_modules/crypto-browserify/README.md
index 9b0c03bea..1b9cf3b08 100644
--- a/node_modules/crypto-browserify/README.md
+++ b/node_modules/crypto-browserify/README.md
@@ -24,6 +24,7 @@ Here is the subset that is currently implemented:
* createVerify (rsa, ecdsa)
* createECDH (secp256k1)
* publicEncrypt/privateDecrypt (rsa)
+* privateEncrypt/publicDecrypt (rsa)
## todo
diff --git a/node_modules/crypto-browserify/index.js b/node_modules/crypto-browserify/index.js
index ea632aae3..3b48da3da 100644
--- a/node_modules/crypto-browserify/index.js
+++ b/node_modules/crypto-browserify/index.js
@@ -4,7 +4,9 @@ exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = r
exports.createHash = exports.Hash = require('create-hash')
exports.createHmac = exports.Hmac = require('create-hmac')
-var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(Object.keys(require('browserify-sign/algos')))
+var algos = require('browserify-sign/algos')
+var algoKeys = Object.keys(algos)
+var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)
exports.getHashes = function () {
return hashes
}
@@ -14,64 +16,77 @@ exports.pbkdf2 = p.pbkdf2
exports.pbkdf2Sync = p.pbkdf2Sync
var aes = require('browserify-cipher')
-;[
- 'Cipher',
- 'createCipher',
- 'Cipheriv',
- 'createCipheriv',
- 'Decipher',
- 'createDecipher',
- 'Decipheriv',
- 'createDecipheriv',
- 'getCiphers',
- 'listCiphers'
-].forEach(function (key) {
- exports[key] = aes[key]
-})
+
+exports.Cipher = aes.Cipher
+exports.createCipher = aes.createCipher
+exports.Cipheriv = aes.Cipheriv
+exports.createCipheriv = aes.createCipheriv
+exports.Decipher = aes.Decipher
+exports.createDecipher = aes.createDecipher
+exports.Decipheriv = aes.Decipheriv
+exports.createDecipheriv = aes.createDecipheriv
+exports.getCiphers = aes.getCiphers
+exports.listCiphers = aes.listCiphers
var dh = require('diffie-hellman')
-;[
- 'DiffieHellmanGroup',
- 'createDiffieHellmanGroup',
- 'getDiffieHellman',
- 'createDiffieHellman',
- 'DiffieHellman'
-].forEach(function (key) {
- exports[key] = dh[key]
-})
+
+exports.DiffieHellmanGroup = dh.DiffieHellmanGroup
+exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup
+exports.getDiffieHellman = dh.getDiffieHellman
+exports.createDiffieHellman = dh.createDiffieHellman
+exports.DiffieHellman = dh.DiffieHellman
var sign = require('browserify-sign')
-;[
- 'createSign',
- 'Sign',
- 'createVerify',
- 'Verify'
-].forEach(function (key) {
- exports[key] = sign[key]
-})
+
+exports.createSign = sign.createSign
+exports.Sign = sign.Sign
+exports.createVerify = sign.createVerify
+exports.Verify = sign.Verify
exports.createECDH = require('create-ecdh')
var publicEncrypt = require('public-encrypt')
-;[
- 'publicEncrypt',
- 'privateEncrypt',
- 'publicDecrypt',
- 'privateDecrypt'
-].forEach(function (key) {
- exports[key] = publicEncrypt[key]
-})
+exports.publicEncrypt = publicEncrypt.publicEncrypt
+exports.privateEncrypt = publicEncrypt.privateEncrypt
+exports.publicDecrypt = publicEncrypt.publicDecrypt
+exports.privateDecrypt = publicEncrypt.privateDecrypt
// the least I can do is make error messages for the rest of the node.js/crypto api.
-;[
- 'createCredentials'
-].forEach(function (name) {
- exports[name] = function () {
- throw new Error([
- 'sorry, ' + name + ' is not implemented yet',
- 'we accept pull requests',
- 'https://github.com/crypto-browserify/crypto-browserify'
- ].join('\n'))
- }
-})
+// ;[
+// 'createCredentials'
+// ].forEach(function (name) {
+// exports[name] = function () {
+// throw new Error([
+// 'sorry, ' + name + ' is not implemented yet',
+// 'we accept pull requests',
+// 'https://github.com/crypto-browserify/crypto-browserify'
+// ].join('\n'))
+// }
+// })
+
+exports.createCredentials = function () {
+ throw new Error([
+ 'sorry, createCredentials is not implemented yet',
+ 'we accept pull requests',
+ 'https://github.com/crypto-browserify/crypto-browserify'
+ ].join('\n'))
+}
+
+exports.constants = {
+ 'DH_CHECK_P_NOT_SAFE_PRIME': 2,
+ 'DH_CHECK_P_NOT_PRIME': 1,
+ 'DH_UNABLE_TO_CHECK_GENERATOR': 4,
+ 'DH_NOT_SUITABLE_GENERATOR': 8,
+ 'NPN_ENABLED': 1,
+ 'ALPN_ENABLED': 1,
+ 'RSA_PKCS1_PADDING': 1,
+ 'RSA_SSLV23_PADDING': 2,
+ 'RSA_NO_PADDING': 3,
+ 'RSA_PKCS1_OAEP_PADDING': 4,
+ 'RSA_X931_PADDING': 5,
+ 'RSA_PKCS1_PSS_PADDING': 6,
+ 'POINT_CONVERSION_COMPRESSED': 2,
+ 'POINT_CONVERSION_UNCOMPRESSED': 4,
+ 'POINT_CONVERSION_HYBRID': 6
+}
diff --git a/node_modules/crypto-browserify/package.json b/node_modules/crypto-browserify/package.json
index f36f2e57a..d7fe9a4a0 100644
--- a/node_modules/crypto-browserify/package.json
+++ b/node_modules/crypto-browserify/package.json
@@ -2,7 +2,7 @@
"author": "Dominic Tarr <dominic.tarr@gmail.com> (dominictarr.com)",
"name": "crypto-browserify",
"description": "implementation of crypto for the browser",
- "version": "3.11.0",
+ "version": "3.11.1",
"homepage": "https://github.com/crypto-browserify/crypto-browserify",
"repository": {
"type": "git",