Merge pull request #498 from larshp/master

S2K - Only generate what is needed
This commit is contained in:
Bart Butler 2017-01-22 23:36:36 -08:00 committed by GitHub
commit bc69357ab5

View File

@ -189,7 +189,7 @@ S2K.prototype.produce_key = function (passphrase, numBytes) {
}
i = 0;
while (rlength <= numBytes) {
while (rlength < numBytes) {
var result = round(prefix.subarray(0,i), this);
arr.push(result);
rlength += result.length;