Release new version
This commit is contained in:
parent
9c76df73ff
commit
ceee85ef35
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "openpgp",
|
||||
"version": "2.2.2",
|
||||
"version": "2.3.0",
|
||||
"license": "LGPL-3.0+",
|
||||
"homepage": "http://openpgpjs.org/",
|
||||
"authors": [
|
||||
|
|
20
dist/openpgp.js
vendored
20
dist/openpgp.js
vendored
|
@ -4773,7 +4773,7 @@ exports.default = {
|
|||
debug: false,
|
||||
show_version: true,
|
||||
show_comment: true,
|
||||
versionstring: "OpenPGP.js v2.2.2",
|
||||
versionstring: "OpenPGP.js v2.3.0",
|
||||
commentstring: "http://openpgpjs.org",
|
||||
keyserver: "https://keyserver.ubuntu.com",
|
||||
node_store: './openpgp.store'
|
||||
|
@ -13422,6 +13422,22 @@ Key.prototype.getEncryptionKeyPacket = function () {
|
|||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Encrypts all secret key and subkey packets
|
||||
* @param {String} passphrase
|
||||
*/
|
||||
Key.prototype.encrypt = function (passphrase) {
|
||||
if (!this.isPrivate()) {
|
||||
throw new Error("Nothing to encrypt in a public key");
|
||||
}
|
||||
|
||||
var keys = this.getAllKeyPackets();
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
keys[i].encrypt(passphrase);
|
||||
keys[i].clearPrivateMPIs();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Decrypts all secret key and subkey packets
|
||||
* @param {String} passphrase
|
||||
|
@ -14013,12 +14029,14 @@ function generate(options) {
|
|||
signaturePacket.hashAlgorithm = _config2.default.prefer_hash_algorithm;
|
||||
signaturePacket.keyFlags = [_enums2.default.keyFlags.certify_keys | _enums2.default.keyFlags.sign_data];
|
||||
signaturePacket.preferredSymmetricAlgorithms = [];
|
||||
// prefer aes256, aes128, then aes192 (no WebCrypto support: https://www.chromium.org/blink/webcrypto#TOC-AES-support)
|
||||
signaturePacket.preferredSymmetricAlgorithms.push(_enums2.default.symmetric.aes256);
|
||||
signaturePacket.preferredSymmetricAlgorithms.push(_enums2.default.symmetric.aes128);
|
||||
signaturePacket.preferredSymmetricAlgorithms.push(_enums2.default.symmetric.aes192);
|
||||
signaturePacket.preferredSymmetricAlgorithms.push(_enums2.default.symmetric.cast5);
|
||||
signaturePacket.preferredSymmetricAlgorithms.push(_enums2.default.symmetric.tripledes);
|
||||
signaturePacket.preferredHashAlgorithms = [];
|
||||
// prefer fast asm.js implementations (SHA-256, SHA-1)
|
||||
signaturePacket.preferredHashAlgorithms.push(_enums2.default.hash.sha256);
|
||||
signaturePacket.preferredHashAlgorithms.push(_enums2.default.hash.sha1);
|
||||
signaturePacket.preferredHashAlgorithms.push(_enums2.default.hash.sha512);
|
||||
|
|
10
dist/openpgp.min.js
vendored
10
dist/openpgp.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/openpgp.worker.min.js
vendored
2
dist/openpgp.worker.min.js
vendored
|
@ -1 +1 @@
|
|||
/*! OpenPGP.js v2.2.2 - 2016-04-24 - this is LGPL licensed code, see LICENSE/our website http://openpgpjs.org/ for more information. */!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a){e.crypto.random.randomBuffer.size<f&&self.postMessage({event:"request-seed"}),self.postMessage(a,e.util.getTransferables.call(e.util,a.data))}self.window={},importScripts("openpgp.min.js");var e=window.openpgp,f=4e4,g=6e4;e.crypto.random.randomBuffer.init(g),self.onmessage=function(a){var b=a.data||{},c=b.options||{};switch(b.event){case"configure":for(var f in b.config)e.config[f]=b.config[f];break;case"seed-random":b.buf instanceof Uint8Array||(b.buf=new Uint8Array(b.buf)),e.crypto.random.randomBuffer.set(b.buf);break;default:if("function"!=typeof e[b.event])throw new Error("Unknown Worker Event");e[b.event](e.packet.clone.parseClonedPackets(c,b.event)).then(function(a){d({event:"method-return",data:e.packet.clone.clonePackets(a)})})["catch"](function(a){d({event:"method-return",err:a.message})})}}},{}]},{},[1]);
|
||||
/*! OpenPGP.js v2.3.0 - 2016-05-03 - this is LGPL licensed code, see LICENSE/our website http://openpgpjs.org/ for more information. */!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a){e.crypto.random.randomBuffer.size<f&&self.postMessage({event:"request-seed"}),self.postMessage(a,e.util.getTransferables.call(e.util,a.data))}self.window={},importScripts("openpgp.min.js");var e=window.openpgp,f=4e4,g=6e4;e.crypto.random.randomBuffer.init(g),self.onmessage=function(a){var b=a.data||{},c=b.options||{};switch(b.event){case"configure":for(var f in b.config)e.config[f]=b.config[f];break;case"seed-random":b.buf instanceof Uint8Array||(b.buf=new Uint8Array(b.buf)),e.crypto.random.randomBuffer.set(b.buf);break;default:if("function"!=typeof e[b.event])throw new Error("Unknown Worker Event");e[b.event](e.packet.clone.parseClonedPackets(c,b.event)).then(function(a){d({event:"method-return",data:e.packet.clone.clonePackets(a)})})["catch"](function(a){d({event:"method-return",err:a.message})})}}},{}]},{},[1]);
|
2
npm-shrinkwrap.json
generated
2
npm-shrinkwrap.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "openpgp",
|
||||
"version": "2.2.2",
|
||||
"version": "2.3.0",
|
||||
"dependencies": {
|
||||
"asmcrypto-lite": {
|
||||
"version": "1.1.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "openpgp",
|
||||
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
|
||||
"version": "2.2.2",
|
||||
"version": "2.3.0",
|
||||
"license": "LGPL-3.0+",
|
||||
"homepage": "http://openpgpjs.org/",
|
||||
"engines": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user