Replace isDecrypted=false with keys[i].clearPrivateMPIs()
This commit is contained in:
parent
0d93127186
commit
4e3937f1e2
|
@ -377,6 +377,7 @@ Key.prototype.encrypt = function(passphrase) {
|
||||||
var keys = this.getAllKeyPackets();
|
var keys = this.getAllKeyPackets();
|
||||||
for (var i = 0; i < keys.length; i++) {
|
for (var i = 0; i < keys.length; i++) {
|
||||||
keys[i].encrypt(passphrase);
|
keys[i].encrypt(passphrase);
|
||||||
|
keys[i].clearPrivateMPIs();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -199,7 +199,6 @@ SecretKey.prototype.encrypt = function (passphrase) {
|
||||||
arr.push(crypto.cfb.normalEncrypt(symmetric, key, cleartext, iv));
|
arr.push(crypto.cfb.normalEncrypt(symmetric, key, cleartext, iv));
|
||||||
|
|
||||||
this.encrypted = util.concatUint8Array(arr);
|
this.encrypted = util.concatUint8Array(arr);
|
||||||
this.isDecrypted = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function produceEncryptionKey(s2k, passphrase, algorithm) {
|
function produceEncryptionKey(s2k, passphrase, algorithm) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user