Updated dependencies

This commit is contained in:
n1474335 2018-03-28 23:56:33 +01:00
parent e6e2b169dc
commit 1097170a68
3 changed files with 582 additions and 663 deletions

1195
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -31,14 +31,14 @@
"bugs": "https://github.com/gchq/CyberChef/issues",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.3",
"babel-loader": "^7.1.4",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.1",
"css-loader": "^0.28.10",
"eslint": "^4.18.1",
"css-loader": "^0.28.11",
"eslint": "^4.19.1",
"exports-loader": "^0.7.0",
"extract-text-webpack-plugin": "^4.0.0-alpha0",
"file-loader": "^1.1.10",
"file-loader": "^1.1.11",
"grunt": ">=1.0.2",
"grunt-accessibility": "~6.0.0",
"grunt-chmod": "~1.1.1",
@ -49,23 +49,23 @@
"grunt-exec": "~3.0.0",
"grunt-execute": "^0.2.2",
"grunt-jsdoc": "^2.2.1",
"grunt-webpack": "^3.0.2",
"html-webpack-plugin": "^3.0.4",
"grunt-webpack": "^3.1.1",
"html-webpack-plugin": "^3.1.0",
"imports-loader": "^0.8.0",
"ink-docstrap": "^1.3.2",
"jsdoc-babel": "^0.3.0",
"less": "^3.0.1",
"less-loader": "^4.0.6",
"postcss-css-variables": "^0.8.0",
"less-loader": "^4.1.0",
"postcss-css-variables": "^0.8.1",
"postcss-import": "^11.1.0",
"postcss-loader": "^2.1.1",
"postcss-loader": "^2.1.3",
"sitemap": "^1.13.0",
"style-loader": "^0.20.2",
"style-loader": "^0.20.3",
"url-loader": "^0.6.2",
"val-loader": "^1.1.0",
"web-resource-inliner": "^4.2.1",
"webpack": "^4.0.1",
"webpack-dev-server": "^3.1.0",
"webpack": "^4.3.0",
"webpack-dev-server": "^3.1.1",
"webpack-node-externals": "^1.6.0",
"worker-loader": "^1.1.1"
},
@ -80,13 +80,13 @@
"crypto-api": "^0.8.0",
"crypto-js": "^3.1.9-1",
"ctph.js": "0.0.5",
"diff": "^3.4.0",
"diff": "^3.5.0",
"escodegen": "^1.9.1",
"es6-promisify": "^5.0.0",
"es6-promisify": "^6.0.0",
"esmangle": "^1.0.1",
"esprima": "^4.0.0",
"exif-parser": "^0.1.12",
"file-saver": "^1.3.3",
"file-saver": "^1.3.8",
"highlight.js": "^9.12.0",
"jquery": "^3.3.1",
"js-crc": "^0.2.0",
@ -94,16 +94,16 @@
"jsbn": "^1.1.0",
"jsesc": "^2.5.1",
"jsonpath": "^1.0.0",
"jsrsasign": "8.0.6",
"jsrsasign": "8.0.7",
"lodash": "^4.17.5",
"loglevel": "^1.6.1",
"kbpgp": "^2.0.76",
"kbpgp": "^2.0.77",
"loglevel-message-prefix": "^3.0.0",
"moment": "^2.20.1",
"moment": "^2.21.0",
"moment-timezone": "^0.5.14",
"node-forge": "^0.7.2",
"node-forge": "^0.7.4",
"node-md6": "^0.1.0",
"nwmatcher": "^1.4.3",
"nwmatcher": "^1.4.4",
"otp": "^0.1.3",
"scryptsy": "^2.0.0",
"sladex-blowfish": "^0.8.1",

View file

@ -1,5 +1,5 @@
import * as kbpgp from "kbpgp";
import promisify from "es6-promisify";
import {promisify} from "es6-promisify";
/**
@ -93,7 +93,7 @@ const PGP = {
});
if (key.is_pgp_locked() && passphrase) {
if (passphrase) {
await promisify(key.unlock_pgp, key)({
await promisify(key.unlock_pgp.bind(key))({
passphrase
});
} else if (!passphrase) {
@ -172,12 +172,12 @@ const PGP = {
return new Promise(async (resolve, reject) => {
try {
const unsignedKey = await promisify(kbpgp.KeyManager.generate)(keyGenerationOptions);
await promisify(unsignedKey.sign, unsignedKey)({});
await promisify(unsignedKey.sign.bind(unsignedKey))({});
let signedKey = unsignedKey;
let privateKeyExportOptions = {};
if (password) privateKeyExportOptions.passphrase = password;
const privateKey = await promisify(signedKey.export_pgp_private, signedKey)(privateKeyExportOptions);
const publicKey = await promisify(signedKey.export_pgp_public, signedKey)({});
const privateKey = await promisify(signedKey.export_pgp_private.bind(signedKey))(privateKeyExportOptions);
const publicKey = await promisify(signedKey.export_pgp_public.bind(signedKey))({});
resolve(privateKey + "\n" + publicKey.trim());
} catch (err) {
reject(`Error whilst generating key pair: ${err}`);