Merge pull request #347 from arzeth/master
Fix running in Node.js (and io.js) with enforced strict mode
This commit is contained in:
commit
42554146e3
|
@ -132,7 +132,6 @@ function ii(a, b, c, d, x, s, t) {
|
|||
}
|
||||
|
||||
function md51(s) {
|
||||
txt = '';
|
||||
var n = s.length,
|
||||
state = [1732584193, -271733879, -1732584194, 271733878],
|
||||
i;
|
||||
|
|
|
@ -153,8 +153,8 @@ S2K.prototype.produce_key = function (passphrase, numBytes) {
|
|||
|
||||
case 'iterated':
|
||||
var isp = [],
|
||||
count = s2k.get_count();
|
||||
data = s2k.salt + passphrase;
|
||||
count = s2k.get_count(),
|
||||
data = s2k.salt + passphrase;
|
||||
|
||||
while (isp.length * data.length < count)
|
||||
isp.push(data);
|
||||
|
|
|
@ -333,8 +333,8 @@ AsyncProxy.prototype.decryptKey = function(privateKey, password) {
|
|||
});
|
||||
|
||||
self.tasks.push({ resolve:function(data) {
|
||||
var packetlist = packet.List.fromStructuredClone(data);
|
||||
data = new key.Key(packetlist);
|
||||
var packetlist = packet.List.fromStructuredClone(data),
|
||||
data = new key.Key(packetlist);
|
||||
resolve(data);
|
||||
}, reject:reject });
|
||||
});
|
||||
|
@ -361,8 +361,8 @@ AsyncProxy.prototype.decryptKeyPacket = function(privateKey, keyIds, password) {
|
|||
});
|
||||
|
||||
self.tasks.push({ resolve:function(data) {
|
||||
var packetlist = packet.List.fromStructuredClone(data);
|
||||
data = new key.Key(packetlist);
|
||||
var packetlist = packet.List.fromStructuredClone(data),
|
||||
data = new key.Key(packetlist);
|
||||
resolve(data);
|
||||
}, reject:reject });
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user