Release new version

This commit is contained in:
Daniel Huigens 2019-02-14 16:18:06 +01:00
parent a0080ebfd1
commit d6a774d89f
6 changed files with 64 additions and 72 deletions

View File

@ -15426,11 +15426,11 @@ utils.intFromLE = intFromLE;
module.exports={
"_args": [
[
"github:openpgpjs/elliptic#ad81845",
"/Users/sunny/Desktop/Protonmail/openpgpjs"
"github:openpgpjs/elliptic",
"/mnt/c/Users/danie/Documents/mega/openpgpjs"
]
],
"_from": "github:openpgpjs/elliptic#ad81845",
"_from": "github:openpgpjs/elliptic",
"_id": "elliptic@github:openpgpjs/elliptic#ad81845f693effa5b4b6d07db2e82112de222f48",
"_inBundle": false,
"_integrity": "",
@ -15438,18 +15438,18 @@ module.exports={
"_phantomChildren": {},
"_requested": {
"type": "git",
"raw": "github:openpgpjs/elliptic#ad81845",
"rawSpec": "github:openpgpjs/elliptic#ad81845",
"saveSpec": "github:openpgpjs/elliptic#ad81845",
"raw": "github:openpgpjs/elliptic",
"rawSpec": "github:openpgpjs/elliptic",
"saveSpec": "github:openpgpjs/elliptic",
"fetchSpec": null,
"gitCommittish": "ad81845"
"gitCommittish": null
},
"_requiredBy": [
"/"
],
"_resolved": "github:openpgpjs/elliptic#ad81845f693effa5b4b6d07db2e82112de222f48",
"_spec": "github:openpgpjs/elliptic#ad81845",
"_where": "/Users/sunny/Desktop/Protonmail/openpgpjs",
"_spec": "github:openpgpjs/elliptic",
"_where": "/mnt/c/Users/danie/Documents/mega/openpgpjs",
"author": {
"name": "Fedor Indutny",
"email": "fedor@indutny.com"
@ -26408,11 +26408,11 @@ module.exports = Stream;
module.exports={
"_args": [
[
"github:openpgpjs/seek-bzip#3aca608",
"/Users/sunny/Desktop/Protonmail/openpgpjs"
"github:openpgpjs/seek-bzip",
"/mnt/c/Users/danie/Documents/mega/openpgpjs"
]
],
"_from": "github:openpgpjs/seek-bzip#3aca608",
"_from": "github:openpgpjs/seek-bzip",
"_id": "seek-bzip@github:openpgpjs/seek-bzip#3aca608ffedc055a1da1d898ecb244804ef32209",
"_inBundle": false,
"_integrity": "",
@ -26422,18 +26422,18 @@ module.exports={
},
"_requested": {
"type": "git",
"raw": "github:openpgpjs/seek-bzip#3aca608",
"rawSpec": "github:openpgpjs/seek-bzip#3aca608",
"saveSpec": "github:openpgpjs/seek-bzip#3aca608",
"raw": "github:openpgpjs/seek-bzip",
"rawSpec": "github:openpgpjs/seek-bzip",
"saveSpec": "github:openpgpjs/seek-bzip",
"fetchSpec": null,
"gitCommittish": "3aca608"
"gitCommittish": null
},
"_requiredBy": [
"/"
],
"_resolved": "github:openpgpjs/seek-bzip#3aca608ffedc055a1da1d898ecb244804ef32209",
"_spec": "github:openpgpjs/seek-bzip#3aca608",
"_where": "/Users/sunny/Desktop/Protonmail/openpgpjs",
"_spec": "github:openpgpjs/seek-bzip",
"_where": "/mnt/c/Users/danie/Documents/mega/openpgpjs",
"bin": {
"seek-bunzip": "./bin/seek-bunzip",
"seek-table": "./bin/seek-bzip-table"
@ -38915,7 +38915,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* Initialize the HKP client and configure it with the key server url and fetch function.
* @constructor
* @param {String} keyServerBaseUrl (optional) The HKP key server base url including
* the protocol to use e.g. https://pgp.mit.edu
* the protocol to use, e.g. 'https://pgp.mit.edu'; defaults to
* openpgp.config.keyserver (https://keyserver.ubuntu.com)
*/
function HKP(keyServerBaseUrl) {
this._baseUrl = keyServerBaseUrl || _config2.default.keyserver;
@ -53231,25 +53232,24 @@ SymmetricallyEncrypted.prototype.decrypt = function () {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return _webStreamTools2.default.readToEnd(this.encrypted);
case 2:
this.encrypted = _context.sent;
_context.next = 5;
return _crypto2.default.cfb.decrypt(sessionKeyAlgorithm, key, this.encrypted.subarray(_crypto2.default.cipher[sessionKeyAlgorithm].blockSize + 2), this.encrypted.subarray(2, _crypto2.default.cipher[sessionKeyAlgorithm].blockSize + 2));
case 5:
decrypted = _context.sent;
if (this.ignore_mdc_error) {
_context.next = 8;
_context.next = 2;
break;
}
throw new Error('Decryption failed due to missing MDC.');
case 8:
case 2:
_context.next = 4;
return _webStreamTools2.default.readToEnd(this.encrypted);
case 4:
this.encrypted = _context.sent;
_context.next = 7;
return _crypto2.default.cfb.decrypt(sessionKeyAlgorithm, key, this.encrypted.subarray(_crypto2.default.cipher[sessionKeyAlgorithm].blockSize + 2), this.encrypted.subarray(2, _crypto2.default.cipher[sessionKeyAlgorithm].blockSize + 2));
case 7:
decrypted = _context.sent;
_context.next = 10;
return this.packets.read(decrypted);
@ -53301,7 +53301,7 @@ SymmetricallyEncrypted.prototype.encrypt = function () {
case 9:
ciphertext = _context2.sent;
this.encrypted = _util2.default.concatUint8Array([FRE, ciphertext]);
this.encrypted = _util2.default.concat([FRE, ciphertext]);
return _context2.abrupt('return', true);
@ -53659,11 +53659,6 @@ if (typeof window !== 'undefined') {
if (typeof TransformStream === 'undefined') {
_dereq_('@mattiasbuelens/web-streams-polyfill');
}
if (typeof TextEncoder === 'undefined') {
var nodeUtil = _util2.default.nodeRequire('util') || {};
global.TextEncoder = nodeUtil.TextEncoder;
global.TextDecoder = nodeUtil.TextDecoder;
}
if (typeof TextEncoder === 'undefined') {
var textEncoding = _dereq_('text-encoding-utf-8');
global.TextEncoder = textEncoding.TextEncoder;

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! OpenPGP.js v4.4.8 - 2019-02-07 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.4.8 - 2019-02-14 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
!function(){return function e(n,r,t){function o(a,f){if(!r[a]){if(!n[a]){var u="function"==typeof require&&require;if(!f&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=r[a]={exports:{}};n[a][0].call(s.exports,function(e){return o(n[a][1][e]||e)},s,s.exports,e,n,r,t)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<t.length;a++)o(t[a]);return o}}()({1:[function(e,n,r){self.window=self,importScripts("openpgp.min.js");var t=window.openpgp,o=[],i=6e4;function a(e){self.postMessage(e,t.util.getTransferables(e.data,!0))}t.crypto.random.randomBuffer.init(i,function(){return o.length||self.postMessage({event:"request-seed",amount:i}),new Promise(function(e){o.push(e)})}),self.onmessage=function(e){var n,r=e.data||{};switch(r.event){case"configure":n=r.config,Object.keys(n).forEach(function(e){t.config[e]=n[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));t.crypto.random.randomBuffer.set(e)}(r.buf);var i=o;o=[];for(var f=0;f<i.length;f++)i[f]();break;default:!function(e,n,r){if("function"!=typeof t[n])return void a({id:e,event:"method-return",err:"Unknown Worker Event"});r=t.packet.clone.parseClonedPackets(r,n),t.util.restoreStreams(r),t[n](r).then(function(n){a({id:e,event:"method-return",data:t.packet.clone.clonePackets(n)})}).catch(function(n){t.util.print_debug_error(n),a({id:e,event:"method-return",err:n.message,stack:n.stack})})}(r.id,r.event,r.options||{})}}},{}]},{},[1]);

53
dist/openpgp.js vendored
View File

@ -11398,11 +11398,11 @@ utils.intFromLE = intFromLE;
module.exports={
"_args": [
[
"github:openpgpjs/elliptic#ad81845",
"/Users/sunny/Desktop/Protonmail/openpgpjs"
"github:openpgpjs/elliptic",
"/mnt/c/Users/danie/Documents/mega/openpgpjs"
]
],
"_from": "github:openpgpjs/elliptic#ad81845",
"_from": "github:openpgpjs/elliptic",
"_id": "elliptic@github:openpgpjs/elliptic#ad81845f693effa5b4b6d07db2e82112de222f48",
"_inBundle": false,
"_integrity": "",
@ -11410,18 +11410,18 @@ module.exports={
"_phantomChildren": {},
"_requested": {
"type": "git",
"raw": "github:openpgpjs/elliptic#ad81845",
"rawSpec": "github:openpgpjs/elliptic#ad81845",
"saveSpec": "github:openpgpjs/elliptic#ad81845",
"raw": "github:openpgpjs/elliptic",
"rawSpec": "github:openpgpjs/elliptic",
"saveSpec": "github:openpgpjs/elliptic",
"fetchSpec": null,
"gitCommittish": "ad81845"
"gitCommittish": null
},
"_requiredBy": [
"/"
],
"_resolved": "github:openpgpjs/elliptic#ad81845f693effa5b4b6d07db2e82112de222f48",
"_spec": "github:openpgpjs/elliptic#ad81845",
"_where": "/Users/sunny/Desktop/Protonmail/openpgpjs",
"_spec": "github:openpgpjs/elliptic",
"_where": "/mnt/c/Users/danie/Documents/mega/openpgpjs",
"author": {
"name": "Fedor Indutny",
"email": "fedor@indutny.com"
@ -21793,11 +21793,11 @@ module.exports = Stream;
module.exports={
"_args": [
[
"github:openpgpjs/seek-bzip#3aca608",
"/Users/sunny/Desktop/Protonmail/openpgpjs"
"github:openpgpjs/seek-bzip",
"/mnt/c/Users/danie/Documents/mega/openpgpjs"
]
],
"_from": "github:openpgpjs/seek-bzip#3aca608",
"_from": "github:openpgpjs/seek-bzip",
"_id": "seek-bzip@github:openpgpjs/seek-bzip#3aca608ffedc055a1da1d898ecb244804ef32209",
"_inBundle": false,
"_integrity": "",
@ -21807,18 +21807,18 @@ module.exports={
},
"_requested": {
"type": "git",
"raw": "github:openpgpjs/seek-bzip#3aca608",
"rawSpec": "github:openpgpjs/seek-bzip#3aca608",
"saveSpec": "github:openpgpjs/seek-bzip#3aca608",
"raw": "github:openpgpjs/seek-bzip",
"rawSpec": "github:openpgpjs/seek-bzip",
"saveSpec": "github:openpgpjs/seek-bzip",
"fetchSpec": null,
"gitCommittish": "3aca608"
"gitCommittish": null
},
"_requiredBy": [
"/"
],
"_resolved": "github:openpgpjs/seek-bzip#3aca608ffedc055a1da1d898ecb244804ef32209",
"_spec": "github:openpgpjs/seek-bzip#3aca608",
"_where": "/Users/sunny/Desktop/Protonmail/openpgpjs",
"_spec": "github:openpgpjs/seek-bzip",
"_where": "/mnt/c/Users/danie/Documents/mega/openpgpjs",
"bin": {
"seek-bunzip": "./bin/seek-bunzip",
"seek-table": "./bin/seek-bzip-table"
@ -30481,7 +30481,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* Initialize the HKP client and configure it with the key server url and fetch function.
* @constructor
* @param {String} keyServerBaseUrl (optional) The HKP key server base url including
* the protocol to use e.g. https://pgp.mit.edu
* the protocol to use, e.g. 'https://pgp.mit.edu'; defaults to
* openpgp.config.keyserver (https://keyserver.ubuntu.com)
*/
function HKP(keyServerBaseUrl) {
this._baseUrl = keyServerBaseUrl || _config2.default.keyserver;
@ -38770,13 +38771,14 @@ SymmetricallyEncrypted.prototype.write = function () {
* @async
*/
SymmetricallyEncrypted.prototype.decrypt = async function (sessionKeyAlgorithm, key) {
this.encrypted = await _webStreamTools2.default.readToEnd(this.encrypted);
const decrypted = await _crypto2.default.cfb.decrypt(sessionKeyAlgorithm, key, this.encrypted.subarray(_crypto2.default.cipher[sessionKeyAlgorithm].blockSize + 2), this.encrypted.subarray(2, _crypto2.default.cipher[sessionKeyAlgorithm].blockSize + 2));
// If MDC errors are not being ignored, all missing MDC packets in symmetrically encrypted data should throw an error
if (!this.ignore_mdc_error) {
throw new Error('Decryption failed due to missing MDC.');
}
this.encrypted = await _webStreamTools2.default.readToEnd(this.encrypted);
const decrypted = await _crypto2.default.cfb.decrypt(sessionKeyAlgorithm, key, this.encrypted.subarray(_crypto2.default.cipher[sessionKeyAlgorithm].blockSize + 2), this.encrypted.subarray(2, _crypto2.default.cipher[sessionKeyAlgorithm].blockSize + 2));
await this.packets.read(decrypted);
return true;
@ -38796,7 +38798,7 @@ SymmetricallyEncrypted.prototype.encrypt = async function (algo, key) {
const prefix = await _crypto2.default.getPrefixRandom(algo);
const FRE = await _crypto2.default.cfb.encrypt(algo, key, prefix, new Uint8Array(_crypto2.default.cipher[algo].blockSize));
const ciphertext = await _crypto2.default.cfb.encrypt(algo, key, data, FRE.subarray(2));
this.encrypted = _util2.default.concatUint8Array([FRE, ciphertext]);
this.encrypted = _util2.default.concat([FRE, ciphertext]);
return true;
};
@ -39126,11 +39128,6 @@ if (typeof window !== 'undefined') {
if (typeof TransformStream === 'undefined') {
require('@mattiasbuelens/web-streams-polyfill');
}
if (typeof TextEncoder === 'undefined') {
const nodeUtil = _util2.default.nodeRequire('util') || {};
global.TextEncoder = nodeUtil.TextEncoder;
global.TextDecoder = nodeUtil.TextDecoder;
}
if (typeof TextEncoder === 'undefined') {
const textEncoding = require('text-encoding-utf-8');
global.TextEncoder = textEncoding.TextEncoder;

4
dist/openpgp.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! OpenPGP.js v4.4.8 - 2019-02-07 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.4.8 - 2019-02-14 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
!function(){return function e(n,r,t){function o(a,f){if(!r[a]){if(!n[a]){var u="function"==typeof require&&require;if(!f&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=r[a]={exports:{}};n[a][0].call(s.exports,function(e){return o(n[a][1][e]||e)},s,s.exports,e,n,r,t)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<t.length;a++)o(t[a]);return o}}()({1:[function(e,n,r){self.window=self,importScripts("openpgp.min.js");var t=window.openpgp,o=[],i=6e4;function a(e){self.postMessage(e,t.util.getTransferables(e.data,!0))}t.crypto.random.randomBuffer.init(i,function(){return o.length||self.postMessage({event:"request-seed",amount:i}),new Promise(function(e){o.push(e)})}),self.onmessage=function(e){var n,r=e.data||{};switch(r.event){case"configure":n=r.config,Object.keys(n).forEach(function(e){t.config[e]=n[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));t.crypto.random.randomBuffer.set(e)}(r.buf);var i=o;o=[];for(var f=0;f<i.length;f++)i[f]();break;default:!function(e,n,r){if("function"!=typeof t[n])return void a({id:e,event:"method-return",err:"Unknown Worker Event"});r=t.packet.clone.parseClonedPackets(r,n),t.util.restoreStreams(r),t[n](r).then(function(n){a({id:e,event:"method-return",data:t.packet.clone.clonePackets(n)})}).catch(function(n){t.util.print_debug_error(n),a({id:e,event:"method-return",err:n.message,stack:n.stack})})}(r.id,r.event,r.options||{})}}},{}]},{},[1]);