bugfixes
This commit is contained in:
parent
b4916e29a3
commit
1c6e777a3d
|
@ -451,7 +451,7 @@ function readArmored(armoredText) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* reads an OpenPGP binary string message and returns a message object
|
* reads an OpenPGP binary string message and returns a message object
|
||||||
* @param {String} binary string message
|
* @param {Uint8Array} binary message
|
||||||
* @return {module:message~Message} new message object
|
* @return {module:message~Message} new message object
|
||||||
* @static
|
* @static
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -225,7 +225,7 @@ AsyncProxy.prototype.decryptMessage = function(privateKey, message, params) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
return self.execute(function() {
|
return self.execute(function() {
|
||||||
if(!(String.prototype.isPrototypeOf(privateKey) || typeof privateKey === 'string')) {
|
if(!(String.prototype.isPrototypeOf(privateKey) || typeof privateKey === 'string' || Uint8Array.prototype.isPrototypeOf(privateKey))) {
|
||||||
privateKey = privateKey.toPacketlist();
|
privateKey = privateKey.toPacketlist();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ self.onmessage = function (event) {
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'decrypt-message':
|
case 'decrypt-message':
|
||||||
if(!(String.prototype.isPrototypeOf(msg.privateKey) || typeof msg.privateKey === 'string')) {
|
if(!(String.prototype.isPrototypeOf(msg.privateKey) || typeof msg.privateKey === 'string' || Uint8Array.prototype.isPrototypeOf(msg.privateKey))) {
|
||||||
msg.privateKey = packetlistCloneToKey(msg.privateKey);
|
msg.privateKey = packetlistCloneToKey(msg.privateKey);
|
||||||
}
|
}
|
||||||
msg.message = packetlistCloneToMessage(msg.message.packets);
|
msg.message = packetlistCloneToMessage(msg.message.packets);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user