Replace isDecrypted=false with keys[i].clearPrivateMPIs()

This commit is contained in:
evilaliv3 2016-04-28 17:40:14 +02:00
parent 0d93127186
commit 4e3937f1e2
2 changed files with 1 additions and 1 deletions

View File

@ -377,6 +377,7 @@ Key.prototype.encrypt = function(passphrase) {
var keys = this.getAllKeyPackets();
for (var i = 0; i < keys.length; i++) {
keys[i].encrypt(passphrase);
keys[i].clearPrivateMPIs();
}
};

View File

@ -199,7 +199,6 @@ SecretKey.prototype.encrypt = function (passphrase) {
arr.push(crypto.cfb.normalEncrypt(symmetric, key, cleartext, iv));
this.encrypted = util.concatUint8Array(arr);
this.isDecrypted = false;
};
function produceEncryptionKey(s2k, passphrase, algorithm) {