Release new version
This commit is contained in:
parent
674e0217fc
commit
35b4380909
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "openpgp",
|
"name": "openpgp",
|
||||||
"version": "4.10.2",
|
"version": "4.10.3",
|
||||||
"license": "LGPL-3.0+",
|
"license": "LGPL-3.0+",
|
||||||
"homepage": "https://openpgpjs.org/",
|
"homepage": "https://openpgpjs.org/",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
96
dist/compat/openpgp.js
vendored
96
dist/compat/openpgp.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/*! OpenPGP.js v4.10.2 - 2020-04-15 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.openpgp = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.openpgp = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
|
||||||
(function (global){
|
(function (global){
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -31127,7 +31127,7 @@ function CleartextMessage(text, signature) {
|
||||||
return new CleartextMessage(text, signature);
|
return new CleartextMessage(text, signature);
|
||||||
}
|
}
|
||||||
// normalize EOL to canonical form <CR><LF>
|
// normalize EOL to canonical form <CR><LF>
|
||||||
this.text = _util2.default.removeTrailingSpaces(text).replace(/\r\n/g, '\n').replace(/[\r\n]/g, '\r\n');
|
this.text = _util2.default.removeTrailingSpaces(text).replace(/\r?\n/g, '\r\n');
|
||||||
if (signature && !(signature instanceof _signature.Signature)) {
|
if (signature && !(signature instanceof _signature.Signature)) {
|
||||||
throw new Error('Invalid signature input');
|
throw new Error('Invalid signature input');
|
||||||
}
|
}
|
||||||
|
@ -31493,7 +31493,7 @@ exports.default = {
|
||||||
* @memberof module:config
|
* @memberof module:config
|
||||||
* @property {String} versionstring A version string to be included in armored messages
|
* @property {String} versionstring A version string to be included in armored messages
|
||||||
*/
|
*/
|
||||||
versionstring: "OpenPGP.js v4.10.2",
|
versionstring: "OpenPGP.js v4.10.3",
|
||||||
/**
|
/**
|
||||||
* @memberof module:config
|
* @memberof module:config
|
||||||
* @property {String} commentstring A comment string to be included in armored messages
|
* @property {String} commentstring A comment string to be included in armored messages
|
||||||
|
@ -36246,7 +36246,7 @@ function decode(msg) {
|
||||||
var len = msg.length;
|
var len = msg.length;
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
var c = msg.charCodeAt(len - 1);
|
var c = msg.charCodeAt(len - 1);
|
||||||
if (c >= 1 && c <= 8) {
|
if (c >= 1) {
|
||||||
var provided = msg.substr(len - c);
|
var provided = msg.substr(len - c);
|
||||||
var computed = String.fromCharCode(c).repeat(c);
|
var computed = String.fromCharCode(c).repeat(c);
|
||||||
if (provided === computed) {
|
if (provided === computed) {
|
||||||
|
@ -51776,6 +51776,10 @@ exports.default = Compressed;
|
||||||
|
|
||||||
var nodeZlib = _util2.default.getNodeZlib();
|
var nodeZlib = _util2.default.getNodeZlib();
|
||||||
|
|
||||||
|
function uncompressed(data) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
function node_zlib(func) {
|
function node_zlib(func) {
|
||||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||||
|
|
||||||
|
@ -51840,6 +51844,7 @@ if (nodeZlib) {
|
||||||
};
|
};
|
||||||
|
|
||||||
decompress_fns = {
|
decompress_fns = {
|
||||||
|
uncompressed: uncompressed,
|
||||||
zip: node_zlib(nodeZlib.createInflateRaw),
|
zip: node_zlib(nodeZlib.createInflateRaw),
|
||||||
zlib: node_zlib(nodeZlib.createInflate),
|
zlib: node_zlib(nodeZlib.createInflate),
|
||||||
bzip2: bzip2(_seekBzip2.default.decode)
|
bzip2: bzip2(_seekBzip2.default.decode)
|
||||||
|
@ -51852,6 +51857,7 @@ if (nodeZlib) {
|
||||||
};
|
};
|
||||||
|
|
||||||
decompress_fns = {
|
decompress_fns = {
|
||||||
|
uncompressed: uncompressed,
|
||||||
zip: pako_zlib(_pako2.default.Inflate, { raw: true }),
|
zip: pako_zlib(_pako2.default.Inflate, { raw: true }),
|
||||||
zlib: pako_zlib(_pako2.default.Inflate),
|
zlib: pako_zlib(_pako2.default.Inflate),
|
||||||
bzip2: bzip2(_seekBzip2.default.decode)
|
bzip2: bzip2(_seekBzip2.default.decode)
|
||||||
|
@ -58066,16 +58072,11 @@ MPI.prototype.toUint8Array = function (endian, length) {
|
||||||
length = length || this.data.length;
|
length = length || this.data.length;
|
||||||
|
|
||||||
var payload = new Uint8Array(length);
|
var payload = new Uint8Array(length);
|
||||||
var start = length - this.data.length;
|
var start = endian === 'le' ? 0 : length - this.data.length;
|
||||||
if (start < 0) {
|
|
||||||
throw new Error('Payload is too large.');
|
|
||||||
}
|
|
||||||
|
|
||||||
payload.set(this.data, start);
|
payload.set(this.data, start);
|
||||||
if (endian === 'le') {
|
if (endian === 'le') {
|
||||||
payload.reverse();
|
payload.reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
return payload;
|
return payload;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -58519,10 +58520,6 @@ Object.defineProperty(exports, "__esModule", {
|
||||||
value: true
|
value: true
|
||||||
});
|
});
|
||||||
|
|
||||||
var _from = _dereq_('babel-runtime/core-js/array/from');
|
|
||||||
|
|
||||||
var _from2 = _interopRequireDefault(_from);
|
|
||||||
|
|
||||||
var _typeof2 = _dereq_('babel-runtime/helpers/typeof');
|
var _typeof2 = _dereq_('babel-runtime/helpers/typeof');
|
||||||
|
|
||||||
var _typeof3 = _interopRequireDefault(_typeof2);
|
var _typeof3 = _interopRequireDefault(_typeof2);
|
||||||
|
@ -59323,18 +59320,44 @@ exports.default = {
|
||||||
canonicalizeEOL: function canonicalizeEOL(data) {
|
canonicalizeEOL: function canonicalizeEOL(data) {
|
||||||
var CR = 13;
|
var CR = 13;
|
||||||
var LF = 10;
|
var LF = 10;
|
||||||
|
var carryOverCR = false;
|
||||||
|
|
||||||
return _webStreamTools2.default.transform(_util2.default.nativeEOL(data, true), function (bytes) {
|
return _webStreamTools2.default.transform(data, function (bytes) {
|
||||||
var normalized = [];
|
if (carryOverCR) {
|
||||||
for (var i = 0; i < bytes.length; i++) {
|
bytes = _util2.default.concatUint8Array([new Uint8Array([CR]), bytes]);
|
||||||
var x = bytes[i];
|
|
||||||
if (x === LF || x === CR) {
|
|
||||||
normalized.push(CR, LF);
|
|
||||||
} else {
|
|
||||||
normalized.push(x);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return new Uint8Array(normalized);
|
|
||||||
|
if (bytes[bytes.length - 1] === CR) {
|
||||||
|
carryOverCR = true;
|
||||||
|
bytes = bytes.subarray(0, -1);
|
||||||
|
} else {
|
||||||
|
carryOverCR = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var index = void 0;
|
||||||
|
var indices = [];
|
||||||
|
for (var i = 0;; i = index) {
|
||||||
|
index = bytes.indexOf(LF, i) + 1;
|
||||||
|
if (index && bytes[index - 2] !== CR) indices.push(index);else break;
|
||||||
|
}
|
||||||
|
if (!indices.length) {
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
var normalized = new Uint8Array(bytes.length + indices.length);
|
||||||
|
var j = 0;
|
||||||
|
for (var _i = 0; _i < indices.length; _i++) {
|
||||||
|
var sub = bytes.subarray(indices[_i - 1] || 0, indices[_i]);
|
||||||
|
normalized.set(sub, j);
|
||||||
|
j += sub.length;
|
||||||
|
normalized[j - 1] = CR;
|
||||||
|
normalized[j] = LF;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
normalized.set(bytes.subarray(indices[indices.length - 1] || 0), j);
|
||||||
|
return normalized;
|
||||||
|
}, function () {
|
||||||
|
return carryOverCR ? new Uint8Array([CR]) : undefined;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -59348,20 +59371,31 @@ exports.default = {
|
||||||
var carryOverCR = false;
|
var carryOverCR = false;
|
||||||
|
|
||||||
return _webStreamTools2.default.transform(data, function (bytes) {
|
return _webStreamTools2.default.transform(data, function (bytes) {
|
||||||
bytes = carryOverCR ? [CR].concat((0, _from2.default)(bytes)) : (0, _from2.default)(bytes);
|
if (carryOverCR && bytes[0] !== LF) {
|
||||||
|
bytes = _util2.default.concatUint8Array([new Uint8Array([CR]), bytes]);
|
||||||
|
} else {
|
||||||
|
bytes = new Uint8Array(bytes); // Don't mutate passed bytes
|
||||||
|
}
|
||||||
|
|
||||||
if (bytes[bytes.length - 1] === CR) {
|
if (bytes[bytes.length - 1] === CR) {
|
||||||
carryOverCR = true;
|
carryOverCR = true;
|
||||||
bytes.pop();
|
bytes = bytes.subarray(0, -1);
|
||||||
} else {
|
} else {
|
||||||
carryOverCR = false;
|
carryOverCR = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Uint8Array(bytes.filter(function (x, i, xs) {
|
var index = void 0;
|
||||||
return x !== CR || i < xs.length - 1 && xs[i + 1] !== LF;
|
var j = 0;
|
||||||
}));
|
for (var i = 0; i !== bytes.length; i = index) {
|
||||||
|
index = bytes.indexOf(CR, i) + 1;
|
||||||
|
if (!index) index = bytes.length;
|
||||||
|
var last = index - (bytes[index] === LF ? 1 : 0);
|
||||||
|
if (i) bytes.copyWithin(j, i, last);
|
||||||
|
j += last - i;
|
||||||
|
}
|
||||||
|
return bytes.subarray(0, j);
|
||||||
}, function () {
|
}, function () {
|
||||||
return new Uint8Array(carryOverCR ? [CR] : []);
|
return carryOverCR ? new Uint8Array([CR]) : undefined;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -59454,7 +59488,7 @@ exports.default = {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
||||||
},{"./config":350,"./encoding/base64":383,"./util":429,"babel-runtime/core-js/array/from":16,"babel-runtime/core-js/object/entries":25,"babel-runtime/core-js/promise":31,"babel-runtime/helpers/asyncToGenerator":35,"babel-runtime/helpers/slicedToArray":40,"babel-runtime/helpers/typeof":42,"babel-runtime/regenerator":43,"email-addresses":302,"web-stream-tools":345}],430:[function(_dereq_,module,exports){
|
},{"./config":350,"./encoding/base64":383,"./util":429,"babel-runtime/core-js/object/entries":25,"babel-runtime/core-js/promise":31,"babel-runtime/helpers/asyncToGenerator":35,"babel-runtime/helpers/slicedToArray":40,"babel-runtime/helpers/typeof":42,"babel-runtime/regenerator":43,"email-addresses":302,"web-stream-tools":345}],430:[function(_dereq_,module,exports){
|
||||||
(function (global){
|
(function (global){
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
|
4
dist/compat/openpgp.min.js
vendored
4
dist/compat/openpgp.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/compat/openpgp.worker.js
vendored
2
dist/compat/openpgp.worker.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/*! OpenPGP.js v4.10.2 - 2020-04-15 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||||
(function (global){
|
(function (global){
|
||||||
// GPG4Browsers - An OpenPGP implementation in javascript
|
// GPG4Browsers - An OpenPGP implementation in javascript
|
||||||
|
|
2
dist/compat/openpgp.worker.min.js
vendored
2
dist/compat/openpgp.worker.min.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
/*! OpenPGP.js v4.10.2 - 2020-04-15 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||||
!function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[i]={exports:{}};n[i][0].call(f.exports,function(e){return o(n[i][1][e]||e)},f,f.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}}()({1:[function(e,n,t){(function(e){importScripts("openpgp.min.js");var n=e.openpgp,t=[],r=6e4;n.crypto.random.randomBuffer.init(r,function(){return t.length||self.postMessage({event:"request-seed",amount:r}),new Promise(function(e){t.push(e)})}),self.onmessage=function(e){var r,s=e.data||{};switch(s.event){case"configure":r=s.config,Object.keys(r).forEach(function(e){n.config[e]=r[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));n.crypto.random.randomBuffer.set(e)}(s.buf);var u=t;t=[];for(var c=0;c<u.length;c++)u[c]();break;default:!function(e,t,r){if("clear-key-cache"===t)return Array.from(o.values()).forEach(e=>{e.isPrivate()&&e.clearPrivateParams()}),o.clear(),void i({id:e,event:"method-return"});if("function"!=typeof n[t])return void i({id:e,event:"method-return",err:"Unknown Worker Event"});n.util.restoreStreams(r),(r=n.packet.clone.parseClonedPackets(r,t)).publicKeys&&(r.publicKeys=r.publicKeys.map(a));r.privateKeys&&(r.privateKeys=r.privateKeys.map(a));n[t](r).then(function(t){i({id:e,event:"method-return",data:n.packet.clone.clonePackets(t)})}).catch(function(t){n.util.print_debug_error(t),i({id:e,event:"method-return",err:t.message,stack:t.stack})})}(s.id,s.event,s.options||{})}};const o=new Map;function a(e){const n=e.armor();return o.has(n)?o.get(n):(o.set(n,e),e)}function i(e){self.postMessage(e,n.util.getTransferables(e.data,!0))}postMessage({event:"loaded"})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|
!function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[i]={exports:{}};n[i][0].call(f.exports,function(e){return o(n[i][1][e]||e)},f,f.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}}()({1:[function(e,n,t){(function(e){importScripts("openpgp.min.js");var n=e.openpgp,t=[],r=6e4;n.crypto.random.randomBuffer.init(r,function(){return t.length||self.postMessage({event:"request-seed",amount:r}),new Promise(function(e){t.push(e)})}),self.onmessage=function(e){var r,s=e.data||{};switch(s.event){case"configure":r=s.config,Object.keys(r).forEach(function(e){n.config[e]=r[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));n.crypto.random.randomBuffer.set(e)}(s.buf);var u=t;t=[];for(var c=0;c<u.length;c++)u[c]();break;default:!function(e,t,r){if("clear-key-cache"===t)return Array.from(o.values()).forEach(e=>{e.isPrivate()&&e.clearPrivateParams()}),o.clear(),void i({id:e,event:"method-return"});if("function"!=typeof n[t])return void i({id:e,event:"method-return",err:"Unknown Worker Event"});n.util.restoreStreams(r),(r=n.packet.clone.parseClonedPackets(r,t)).publicKeys&&(r.publicKeys=r.publicKeys.map(a));r.privateKeys&&(r.privateKeys=r.privateKeys.map(a));n[t](r).then(function(t){i({id:e,event:"method-return",data:n.packet.clone.clonePackets(t)})}).catch(function(t){n.util.print_debug_error(t),i({id:e,event:"method-return",err:t.message,stack:t.stack})})}(s.id,s.event,s.options||{})}};const o=new Map;function a(e){const n=e.armor();return o.has(n)?o.get(n):(o.set(n,e),e)}function i(e){self.postMessage(e,n.util.getTransferables(e.data,!0))}postMessage({event:"loaded"})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|
88
dist/lightweight/openpgp.js
vendored
88
dist/lightweight/openpgp.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/*! OpenPGP.js v4.10.2 - 2020-04-15 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.openpgp = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.openpgp = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||||
(function (global){
|
(function (global){
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -20335,7 +20335,7 @@ function CleartextMessage(text, signature) {
|
||||||
return new CleartextMessage(text, signature);
|
return new CleartextMessage(text, signature);
|
||||||
}
|
}
|
||||||
// normalize EOL to canonical form <CR><LF>
|
// normalize EOL to canonical form <CR><LF>
|
||||||
this.text = _util2.default.removeTrailingSpaces(text).replace(/\r\n/g, '\n').replace(/[\r\n]/g, '\r\n');
|
this.text = _util2.default.removeTrailingSpaces(text).replace(/\r?\n/g, '\r\n');
|
||||||
if (signature && !(signature instanceof _signature.Signature)) {
|
if (signature && !(signature instanceof _signature.Signature)) {
|
||||||
throw new Error('Invalid signature input');
|
throw new Error('Invalid signature input');
|
||||||
}
|
}
|
||||||
|
@ -20665,7 +20665,7 @@ exports.default = {
|
||||||
* @memberof module:config
|
* @memberof module:config
|
||||||
* @property {String} versionstring A version string to be included in armored messages
|
* @property {String} versionstring A version string to be included in armored messages
|
||||||
*/
|
*/
|
||||||
versionstring: "OpenPGP.js v4.10.2",
|
versionstring: "OpenPGP.js v4.10.3",
|
||||||
/**
|
/**
|
||||||
* @memberof module:config
|
* @memberof module:config
|
||||||
* @property {String} commentstring A comment string to be included in armored messages
|
* @property {String} commentstring A comment string to be included in armored messages
|
||||||
|
@ -24381,7 +24381,7 @@ function decode(msg) {
|
||||||
const len = msg.length;
|
const len = msg.length;
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
const c = msg.charCodeAt(len - 1);
|
const c = msg.charCodeAt(len - 1);
|
||||||
if (c >= 1 && c <= 8) {
|
if (c >= 1) {
|
||||||
const provided = msg.substr(len - c);
|
const provided = msg.substr(len - c);
|
||||||
const computed = String.fromCharCode(c).repeat(c);
|
const computed = String.fromCharCode(c).repeat(c);
|
||||||
if (provided === computed) {
|
if (provided === computed) {
|
||||||
|
@ -33258,6 +33258,10 @@ exports.default = Compressed;
|
||||||
|
|
||||||
const nodeZlib = _util2.default.getNodeZlib();
|
const nodeZlib = _util2.default.getNodeZlib();
|
||||||
|
|
||||||
|
function uncompressed(data) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
function node_zlib(func, options = {}) {
|
function node_zlib(func, options = {}) {
|
||||||
return function (data) {
|
return function (data) {
|
||||||
return _webStreamTools2.default.nodeToWeb(_webStreamTools2.default.webToNode(data).pipe(func(options)));
|
return _webStreamTools2.default.nodeToWeb(_webStreamTools2.default.webToNode(data).pipe(func(options)));
|
||||||
|
@ -33297,6 +33301,7 @@ if (nodeZlib) {
|
||||||
};
|
};
|
||||||
|
|
||||||
decompress_fns = {
|
decompress_fns = {
|
||||||
|
uncompressed: uncompressed,
|
||||||
zip: node_zlib(nodeZlib.createInflateRaw),
|
zip: node_zlib(nodeZlib.createInflateRaw),
|
||||||
zlib: node_zlib(nodeZlib.createInflate),
|
zlib: node_zlib(nodeZlib.createInflate),
|
||||||
bzip2: bzip2(_seekBzip2.default.decode)
|
bzip2: bzip2(_seekBzip2.default.decode)
|
||||||
|
@ -33309,6 +33314,7 @@ if (nodeZlib) {
|
||||||
};
|
};
|
||||||
|
|
||||||
decompress_fns = {
|
decompress_fns = {
|
||||||
|
uncompressed: uncompressed,
|
||||||
zip: pako_zlib(_pako2.default.Inflate, { raw: true }),
|
zip: pako_zlib(_pako2.default.Inflate, { raw: true }),
|
||||||
zlib: pako_zlib(_pako2.default.Inflate),
|
zlib: pako_zlib(_pako2.default.Inflate),
|
||||||
bzip2: bzip2(_seekBzip2.default.decode)
|
bzip2: bzip2(_seekBzip2.default.decode)
|
||||||
|
@ -37752,16 +37758,11 @@ MPI.prototype.toUint8Array = function (endian, length) {
|
||||||
length = length || this.data.length;
|
length = length || this.data.length;
|
||||||
|
|
||||||
const payload = new Uint8Array(length);
|
const payload = new Uint8Array(length);
|
||||||
const start = length - this.data.length;
|
const start = endian === 'le' ? 0 : length - this.data.length;
|
||||||
if (start < 0) {
|
|
||||||
throw new Error('Payload is too large.');
|
|
||||||
}
|
|
||||||
|
|
||||||
payload.set(this.data, start);
|
payload.set(this.data, start);
|
||||||
if (endian === 'le') {
|
if (endian === 'le') {
|
||||||
payload.reverse();
|
payload.reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
return payload;
|
return payload;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38850,19 +38851,43 @@ exports.default = {
|
||||||
canonicalizeEOL: function canonicalizeEOL(data) {
|
canonicalizeEOL: function canonicalizeEOL(data) {
|
||||||
const CR = 13;
|
const CR = 13;
|
||||||
const LF = 10;
|
const LF = 10;
|
||||||
|
let carryOverCR = false;
|
||||||
|
|
||||||
return _webStreamTools2.default.transform(_util2.default.nativeEOL(data, true), bytes => {
|
return _webStreamTools2.default.transform(data, bytes => {
|
||||||
const normalized = [];
|
if (carryOverCR) {
|
||||||
for (let i = 0; i < bytes.length; i++) {
|
bytes = _util2.default.concatUint8Array([new Uint8Array([CR]), bytes]);
|
||||||
const x = bytes[i];
|
|
||||||
if (x === LF || x === CR) {
|
|
||||||
normalized.push(CR, LF);
|
|
||||||
} else {
|
|
||||||
normalized.push(x);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return new Uint8Array(normalized);
|
|
||||||
});
|
if (bytes[bytes.length - 1] === CR) {
|
||||||
|
carryOverCR = true;
|
||||||
|
bytes = bytes.subarray(0, -1);
|
||||||
|
} else {
|
||||||
|
carryOverCR = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let index;
|
||||||
|
const indices = [];
|
||||||
|
for (let i = 0;; i = index) {
|
||||||
|
index = bytes.indexOf(LF, i) + 1;
|
||||||
|
if (index && bytes[index - 2] !== CR) indices.push(index);else break;
|
||||||
|
}
|
||||||
|
if (!indices.length) {
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
const normalized = new Uint8Array(bytes.length + indices.length);
|
||||||
|
let j = 0;
|
||||||
|
for (let i = 0; i < indices.length; i++) {
|
||||||
|
const sub = bytes.subarray(indices[i - 1] || 0, indices[i]);
|
||||||
|
normalized.set(sub, j);
|
||||||
|
j += sub.length;
|
||||||
|
normalized[j - 1] = CR;
|
||||||
|
normalized[j] = LF;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
normalized.set(bytes.subarray(indices[indices.length - 1] || 0), j);
|
||||||
|
return normalized;
|
||||||
|
}, () => carryOverCR ? new Uint8Array([CR]) : undefined);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -38875,17 +38900,30 @@ exports.default = {
|
||||||
let carryOverCR = false;
|
let carryOverCR = false;
|
||||||
|
|
||||||
return _webStreamTools2.default.transform(data, bytes => {
|
return _webStreamTools2.default.transform(data, bytes => {
|
||||||
bytes = carryOverCR ? [CR].concat(Array.from(bytes)) : Array.from(bytes);
|
if (carryOverCR && bytes[0] !== LF) {
|
||||||
|
bytes = _util2.default.concatUint8Array([new Uint8Array([CR]), bytes]);
|
||||||
|
} else {
|
||||||
|
bytes = new Uint8Array(bytes); // Don't mutate passed bytes
|
||||||
|
}
|
||||||
|
|
||||||
if (bytes[bytes.length - 1] === CR) {
|
if (bytes[bytes.length - 1] === CR) {
|
||||||
carryOverCR = true;
|
carryOverCR = true;
|
||||||
bytes.pop();
|
bytes = bytes.subarray(0, -1);
|
||||||
} else {
|
} else {
|
||||||
carryOverCR = false;
|
carryOverCR = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Uint8Array(bytes.filter((x, i, xs) => x !== CR || i < xs.length - 1 && xs[i + 1] !== LF));
|
let index;
|
||||||
}, () => new Uint8Array(carryOverCR ? [CR] : []));
|
let j = 0;
|
||||||
|
for (let i = 0; i !== bytes.length; i = index) {
|
||||||
|
index = bytes.indexOf(CR, i) + 1;
|
||||||
|
if (!index) index = bytes.length;
|
||||||
|
const last = index - (bytes[index] === LF ? 1 : 0);
|
||||||
|
if (i) bytes.copyWithin(j, i, last);
|
||||||
|
j += last - i;
|
||||||
|
}
|
||||||
|
return bytes.subarray(0, j);
|
||||||
|
}, () => carryOverCR ? new Uint8Array([CR]) : undefined);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
4
dist/lightweight/openpgp.min.js
vendored
4
dist/lightweight/openpgp.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/lightweight/openpgp.worker.js
vendored
2
dist/lightweight/openpgp.worker.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/*! OpenPGP.js v4.10.2 - 2020-04-15 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||||
(function (global){
|
(function (global){
|
||||||
// GPG4Browsers - An OpenPGP implementation in javascript
|
// GPG4Browsers - An OpenPGP implementation in javascript
|
||||||
|
|
2
dist/lightweight/openpgp.worker.min.js
vendored
2
dist/lightweight/openpgp.worker.min.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
/*! OpenPGP.js v4.10.2 - 2020-04-15 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||||
!function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[i]={exports:{}};n[i][0].call(f.exports,function(e){return o(n[i][1][e]||e)},f,f.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}}()({1:[function(e,n,t){(function(e){importScripts("openpgp.min.js");var n=e.openpgp,t=[],r=6e4;n.crypto.random.randomBuffer.init(r,function(){return t.length||self.postMessage({event:"request-seed",amount:r}),new Promise(function(e){t.push(e)})}),self.onmessage=function(e){var r,s=e.data||{};switch(s.event){case"configure":r=s.config,Object.keys(r).forEach(function(e){n.config[e]=r[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));n.crypto.random.randomBuffer.set(e)}(s.buf);var u=t;t=[];for(var c=0;c<u.length;c++)u[c]();break;default:!function(e,t,r){if("clear-key-cache"===t)return Array.from(o.values()).forEach(e=>{e.isPrivate()&&e.clearPrivateParams()}),o.clear(),void i({id:e,event:"method-return"});if("function"!=typeof n[t])return void i({id:e,event:"method-return",err:"Unknown Worker Event"});n.util.restoreStreams(r),(r=n.packet.clone.parseClonedPackets(r,t)).publicKeys&&(r.publicKeys=r.publicKeys.map(a));r.privateKeys&&(r.privateKeys=r.privateKeys.map(a));n[t](r).then(function(t){i({id:e,event:"method-return",data:n.packet.clone.clonePackets(t)})}).catch(function(t){n.util.print_debug_error(t),i({id:e,event:"method-return",err:t.message,stack:t.stack})})}(s.id,s.event,s.options||{})}};const o=new Map;function a(e){const n=e.armor();return o.has(n)?o.get(n):(o.set(n,e),e)}function i(e){self.postMessage(e,n.util.getTransferables(e.data,!0))}postMessage({event:"loaded"})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|
!function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[i]={exports:{}};n[i][0].call(f.exports,function(e){return o(n[i][1][e]||e)},f,f.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}}()({1:[function(e,n,t){(function(e){importScripts("openpgp.min.js");var n=e.openpgp,t=[],r=6e4;n.crypto.random.randomBuffer.init(r,function(){return t.length||self.postMessage({event:"request-seed",amount:r}),new Promise(function(e){t.push(e)})}),self.onmessage=function(e){var r,s=e.data||{};switch(s.event){case"configure":r=s.config,Object.keys(r).forEach(function(e){n.config[e]=r[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));n.crypto.random.randomBuffer.set(e)}(s.buf);var u=t;t=[];for(var c=0;c<u.length;c++)u[c]();break;default:!function(e,t,r){if("clear-key-cache"===t)return Array.from(o.values()).forEach(e=>{e.isPrivate()&&e.clearPrivateParams()}),o.clear(),void i({id:e,event:"method-return"});if("function"!=typeof n[t])return void i({id:e,event:"method-return",err:"Unknown Worker Event"});n.util.restoreStreams(r),(r=n.packet.clone.parseClonedPackets(r,t)).publicKeys&&(r.publicKeys=r.publicKeys.map(a));r.privateKeys&&(r.privateKeys=r.privateKeys.map(a));n[t](r).then(function(t){i({id:e,event:"method-return",data:n.packet.clone.clonePackets(t)})}).catch(function(t){n.util.print_debug_error(t),i({id:e,event:"method-return",err:t.message,stack:t.stack})})}(s.id,s.event,s.options||{})}};const o=new Map;function a(e){const n=e.armor();return o.has(n)?o.get(n):(o.set(n,e),e)}function i(e){self.postMessage(e,n.util.getTransferables(e.data,!0))}postMessage({event:"loaded"})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|
88
dist/openpgp.js
vendored
88
dist/openpgp.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/*! OpenPGP.js v4.10.2 - 2020-04-15 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.openpgp = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.openpgp = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||||
(function (global){
|
(function (global){
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -24722,7 +24722,7 @@ function CleartextMessage(text, signature) {
|
||||||
return new CleartextMessage(text, signature);
|
return new CleartextMessage(text, signature);
|
||||||
}
|
}
|
||||||
// normalize EOL to canonical form <CR><LF>
|
// normalize EOL to canonical form <CR><LF>
|
||||||
this.text = _util2.default.removeTrailingSpaces(text).replace(/\r\n/g, '\n').replace(/[\r\n]/g, '\r\n');
|
this.text = _util2.default.removeTrailingSpaces(text).replace(/\r?\n/g, '\r\n');
|
||||||
if (signature && !(signature instanceof _signature.Signature)) {
|
if (signature && !(signature instanceof _signature.Signature)) {
|
||||||
throw new Error('Invalid signature input');
|
throw new Error('Invalid signature input');
|
||||||
}
|
}
|
||||||
|
@ -25052,7 +25052,7 @@ exports.default = {
|
||||||
* @memberof module:config
|
* @memberof module:config
|
||||||
* @property {String} versionstring A version string to be included in armored messages
|
* @property {String} versionstring A version string to be included in armored messages
|
||||||
*/
|
*/
|
||||||
versionstring: "OpenPGP.js v4.10.2",
|
versionstring: "OpenPGP.js v4.10.3",
|
||||||
/**
|
/**
|
||||||
* @memberof module:config
|
* @memberof module:config
|
||||||
* @property {String} commentstring A comment string to be included in armored messages
|
* @property {String} commentstring A comment string to be included in armored messages
|
||||||
|
@ -28768,7 +28768,7 @@ function decode(msg) {
|
||||||
const len = msg.length;
|
const len = msg.length;
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
const c = msg.charCodeAt(len - 1);
|
const c = msg.charCodeAt(len - 1);
|
||||||
if (c >= 1 && c <= 8) {
|
if (c >= 1) {
|
||||||
const provided = msg.substr(len - c);
|
const provided = msg.substr(len - c);
|
||||||
const computed = String.fromCharCode(c).repeat(c);
|
const computed = String.fromCharCode(c).repeat(c);
|
||||||
if (provided === computed) {
|
if (provided === computed) {
|
||||||
|
@ -37645,6 +37645,10 @@ exports.default = Compressed;
|
||||||
|
|
||||||
const nodeZlib = _util2.default.getNodeZlib();
|
const nodeZlib = _util2.default.getNodeZlib();
|
||||||
|
|
||||||
|
function uncompressed(data) {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
function node_zlib(func, options = {}) {
|
function node_zlib(func, options = {}) {
|
||||||
return function (data) {
|
return function (data) {
|
||||||
return _webStreamTools2.default.nodeToWeb(_webStreamTools2.default.webToNode(data).pipe(func(options)));
|
return _webStreamTools2.default.nodeToWeb(_webStreamTools2.default.webToNode(data).pipe(func(options)));
|
||||||
|
@ -37684,6 +37688,7 @@ if (nodeZlib) {
|
||||||
};
|
};
|
||||||
|
|
||||||
decompress_fns = {
|
decompress_fns = {
|
||||||
|
uncompressed: uncompressed,
|
||||||
zip: node_zlib(nodeZlib.createInflateRaw),
|
zip: node_zlib(nodeZlib.createInflateRaw),
|
||||||
zlib: node_zlib(nodeZlib.createInflate),
|
zlib: node_zlib(nodeZlib.createInflate),
|
||||||
bzip2: bzip2(_seekBzip2.default.decode)
|
bzip2: bzip2(_seekBzip2.default.decode)
|
||||||
|
@ -37696,6 +37701,7 @@ if (nodeZlib) {
|
||||||
};
|
};
|
||||||
|
|
||||||
decompress_fns = {
|
decompress_fns = {
|
||||||
|
uncompressed: uncompressed,
|
||||||
zip: pako_zlib(_pako2.default.Inflate, { raw: true }),
|
zip: pako_zlib(_pako2.default.Inflate, { raw: true }),
|
||||||
zlib: pako_zlib(_pako2.default.Inflate),
|
zlib: pako_zlib(_pako2.default.Inflate),
|
||||||
bzip2: bzip2(_seekBzip2.default.decode)
|
bzip2: bzip2(_seekBzip2.default.decode)
|
||||||
|
@ -42139,16 +42145,11 @@ MPI.prototype.toUint8Array = function (endian, length) {
|
||||||
length = length || this.data.length;
|
length = length || this.data.length;
|
||||||
|
|
||||||
const payload = new Uint8Array(length);
|
const payload = new Uint8Array(length);
|
||||||
const start = length - this.data.length;
|
const start = endian === 'le' ? 0 : length - this.data.length;
|
||||||
if (start < 0) {
|
|
||||||
throw new Error('Payload is too large.');
|
|
||||||
}
|
|
||||||
|
|
||||||
payload.set(this.data, start);
|
payload.set(this.data, start);
|
||||||
if (endian === 'le') {
|
if (endian === 'le') {
|
||||||
payload.reverse();
|
payload.reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
return payload;
|
return payload;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43237,19 +43238,43 @@ exports.default = {
|
||||||
canonicalizeEOL: function canonicalizeEOL(data) {
|
canonicalizeEOL: function canonicalizeEOL(data) {
|
||||||
const CR = 13;
|
const CR = 13;
|
||||||
const LF = 10;
|
const LF = 10;
|
||||||
|
let carryOverCR = false;
|
||||||
|
|
||||||
return _webStreamTools2.default.transform(_util2.default.nativeEOL(data, true), bytes => {
|
return _webStreamTools2.default.transform(data, bytes => {
|
||||||
const normalized = [];
|
if (carryOverCR) {
|
||||||
for (let i = 0; i < bytes.length; i++) {
|
bytes = _util2.default.concatUint8Array([new Uint8Array([CR]), bytes]);
|
||||||
const x = bytes[i];
|
|
||||||
if (x === LF || x === CR) {
|
|
||||||
normalized.push(CR, LF);
|
|
||||||
} else {
|
|
||||||
normalized.push(x);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return new Uint8Array(normalized);
|
|
||||||
});
|
if (bytes[bytes.length - 1] === CR) {
|
||||||
|
carryOverCR = true;
|
||||||
|
bytes = bytes.subarray(0, -1);
|
||||||
|
} else {
|
||||||
|
carryOverCR = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let index;
|
||||||
|
const indices = [];
|
||||||
|
for (let i = 0;; i = index) {
|
||||||
|
index = bytes.indexOf(LF, i) + 1;
|
||||||
|
if (index && bytes[index - 2] !== CR) indices.push(index);else break;
|
||||||
|
}
|
||||||
|
if (!indices.length) {
|
||||||
|
return bytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
const normalized = new Uint8Array(bytes.length + indices.length);
|
||||||
|
let j = 0;
|
||||||
|
for (let i = 0; i < indices.length; i++) {
|
||||||
|
const sub = bytes.subarray(indices[i - 1] || 0, indices[i]);
|
||||||
|
normalized.set(sub, j);
|
||||||
|
j += sub.length;
|
||||||
|
normalized[j - 1] = CR;
|
||||||
|
normalized[j] = LF;
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
normalized.set(bytes.subarray(indices[indices.length - 1] || 0), j);
|
||||||
|
return normalized;
|
||||||
|
}, () => carryOverCR ? new Uint8Array([CR]) : undefined);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43262,17 +43287,30 @@ exports.default = {
|
||||||
let carryOverCR = false;
|
let carryOverCR = false;
|
||||||
|
|
||||||
return _webStreamTools2.default.transform(data, bytes => {
|
return _webStreamTools2.default.transform(data, bytes => {
|
||||||
bytes = carryOverCR ? [CR].concat(Array.from(bytes)) : Array.from(bytes);
|
if (carryOverCR && bytes[0] !== LF) {
|
||||||
|
bytes = _util2.default.concatUint8Array([new Uint8Array([CR]), bytes]);
|
||||||
|
} else {
|
||||||
|
bytes = new Uint8Array(bytes); // Don't mutate passed bytes
|
||||||
|
}
|
||||||
|
|
||||||
if (bytes[bytes.length - 1] === CR) {
|
if (bytes[bytes.length - 1] === CR) {
|
||||||
carryOverCR = true;
|
carryOverCR = true;
|
||||||
bytes.pop();
|
bytes = bytes.subarray(0, -1);
|
||||||
} else {
|
} else {
|
||||||
carryOverCR = false;
|
carryOverCR = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Uint8Array(bytes.filter((x, i, xs) => x !== CR || i < xs.length - 1 && xs[i + 1] !== LF));
|
let index;
|
||||||
}, () => new Uint8Array(carryOverCR ? [CR] : []));
|
let j = 0;
|
||||||
|
for (let i = 0; i !== bytes.length; i = index) {
|
||||||
|
index = bytes.indexOf(CR, i) + 1;
|
||||||
|
if (!index) index = bytes.length;
|
||||||
|
const last = index - (bytes[index] === LF ? 1 : 0);
|
||||||
|
if (i) bytes.copyWithin(j, i, last);
|
||||||
|
j += last - i;
|
||||||
|
}
|
||||||
|
return bytes.subarray(0, j);
|
||||||
|
}, () => carryOverCR ? new Uint8Array([CR]) : undefined);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
4
dist/openpgp.min.js
vendored
4
dist/openpgp.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/openpgp.worker.js
vendored
2
dist/openpgp.worker.js
vendored
|
@ -1,4 +1,4 @@
|
||||||
/*! OpenPGP.js v4.10.2 - 2020-04-15 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
||||||
(function (global){
|
(function (global){
|
||||||
// GPG4Browsers - An OpenPGP implementation in javascript
|
// GPG4Browsers - An OpenPGP implementation in javascript
|
||||||
|
|
2
dist/openpgp.worker.min.js
vendored
2
dist/openpgp.worker.min.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
/*! OpenPGP.js v4.10.2 - 2020-04-15 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
/*! OpenPGP.js v4.10.3 - 2020-04-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||||
!function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[i]={exports:{}};n[i][0].call(f.exports,function(e){return o(n[i][1][e]||e)},f,f.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}}()({1:[function(e,n,t){(function(e){importScripts("openpgp.min.js");var n=e.openpgp,t=[],r=6e4;n.crypto.random.randomBuffer.init(r,function(){return t.length||self.postMessage({event:"request-seed",amount:r}),new Promise(function(e){t.push(e)})}),self.onmessage=function(e){var r,s=e.data||{};switch(s.event){case"configure":r=s.config,Object.keys(r).forEach(function(e){n.config[e]=r[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));n.crypto.random.randomBuffer.set(e)}(s.buf);var u=t;t=[];for(var c=0;c<u.length;c++)u[c]();break;default:!function(e,t,r){if("clear-key-cache"===t)return Array.from(o.values()).forEach(e=>{e.isPrivate()&&e.clearPrivateParams()}),o.clear(),void i({id:e,event:"method-return"});if("function"!=typeof n[t])return void i({id:e,event:"method-return",err:"Unknown Worker Event"});n.util.restoreStreams(r),(r=n.packet.clone.parseClonedPackets(r,t)).publicKeys&&(r.publicKeys=r.publicKeys.map(a));r.privateKeys&&(r.privateKeys=r.privateKeys.map(a));n[t](r).then(function(t){i({id:e,event:"method-return",data:n.packet.clone.clonePackets(t)})}).catch(function(t){n.util.print_debug_error(t),i({id:e,event:"method-return",err:t.message,stack:t.stack})})}(s.id,s.event,s.options||{})}};const o=new Map;function a(e){const n=e.armor();return o.has(n)?o.get(n):(o.set(n,e),e)}function i(e){self.postMessage(e,n.util.getTransferables(e.data,!0))}postMessage({event:"loaded"})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|
!function(){return function e(n,t,r){function o(i,s){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!s&&u)return u(i,!0);if(a)return a(i,!0);var c=new Error("Cannot find module '"+i+"'");throw c.code="MODULE_NOT_FOUND",c}var f=t[i]={exports:{}};n[i][0].call(f.exports,function(e){return o(n[i][1][e]||e)},f,f.exports,e,n,t,r)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<r.length;i++)o(r[i]);return o}}()({1:[function(e,n,t){(function(e){importScripts("openpgp.min.js");var n=e.openpgp,t=[],r=6e4;n.crypto.random.randomBuffer.init(r,function(){return t.length||self.postMessage({event:"request-seed",amount:r}),new Promise(function(e){t.push(e)})}),self.onmessage=function(e){var r,s=e.data||{};switch(s.event){case"configure":r=s.config,Object.keys(r).forEach(function(e){n.config[e]=r[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));n.crypto.random.randomBuffer.set(e)}(s.buf);var u=t;t=[];for(var c=0;c<u.length;c++)u[c]();break;default:!function(e,t,r){if("clear-key-cache"===t)return Array.from(o.values()).forEach(e=>{e.isPrivate()&&e.clearPrivateParams()}),o.clear(),void i({id:e,event:"method-return"});if("function"!=typeof n[t])return void i({id:e,event:"method-return",err:"Unknown Worker Event"});n.util.restoreStreams(r),(r=n.packet.clone.parseClonedPackets(r,t)).publicKeys&&(r.publicKeys=r.publicKeys.map(a));r.privateKeys&&(r.privateKeys=r.privateKeys.map(a));n[t](r).then(function(t){i({id:e,event:"method-return",data:n.packet.clone.clonePackets(t)})}).catch(function(t){n.util.print_debug_error(t),i({id:e,event:"method-return",err:t.message,stack:t.stack})})}(s.id,s.event,s.options||{})}};const o=new Map;function a(e){const n=e.armor();return o.has(n)?o.get(n):(o.set(n,e),e)}function i(e){self.postMessage(e,n.util.getTransferables(e.data,!0))}postMessage({event:"loaded"})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]);
|
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "openpgp",
|
"name": "openpgp",
|
||||||
"version": "4.10.2",
|
"version": "4.10.3",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "openpgp",
|
"name": "openpgp",
|
||||||
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
|
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
|
||||||
"version": "4.10.2",
|
"version": "4.10.3",
|
||||||
"license": "LGPL-3.0+",
|
"license": "LGPL-3.0+",
|
||||||
"homepage": "https://openpgpjs.org/",
|
"homepage": "https://openpgpjs.org/",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user