This commit is contained in:
Bart Butler 2015-04-17 18:36:07 -07:00 committed by Tankred Hase
parent b4916e29a3
commit 1c6e777a3d
3 changed files with 3 additions and 3 deletions

View File

@ -451,7 +451,7 @@ function readArmored(armoredText) {
/**
* 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
* @static
*/

View File

@ -225,7 +225,7 @@ AsyncProxy.prototype.decryptMessage = function(privateKey, message, params) {
var self = this;
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();
}

View File

@ -97,7 +97,7 @@ self.onmessage = function (event) {
});
break;
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.message = packetlistCloneToMessage(msg.message.packets);