Merge pull request #347 from arzeth/master

Fix running in Node.js (and io.js) with enforced strict mode
This commit is contained in:
Giovanni Pellerano 2015-08-19 21:17:08 +02:00
commit 42554146e3
3 changed files with 6 additions and 7 deletions

View File

@ -132,7 +132,6 @@ function ii(a, b, c, d, x, s, t) {
} }
function md51(s) { function md51(s) {
txt = '';
var n = s.length, var n = s.length,
state = [1732584193, -271733879, -1732584194, 271733878], state = [1732584193, -271733879, -1732584194, 271733878],
i; i;

View File

@ -153,7 +153,7 @@ S2K.prototype.produce_key = function (passphrase, numBytes) {
case 'iterated': case 'iterated':
var isp = [], var isp = [],
count = s2k.get_count(); count = s2k.get_count(),
data = s2k.salt + passphrase; data = s2k.salt + passphrase;
while (isp.length * data.length < count) while (isp.length * data.length < count)

View File

@ -333,7 +333,7 @@ AsyncProxy.prototype.decryptKey = function(privateKey, password) {
}); });
self.tasks.push({ resolve:function(data) { self.tasks.push({ resolve:function(data) {
var packetlist = packet.List.fromStructuredClone(data); var packetlist = packet.List.fromStructuredClone(data),
data = new key.Key(packetlist); data = new key.Key(packetlist);
resolve(data); resolve(data);
}, reject:reject }); }, reject:reject });
@ -361,7 +361,7 @@ AsyncProxy.prototype.decryptKeyPacket = function(privateKey, keyIds, password) {
}); });
self.tasks.push({ resolve:function(data) { self.tasks.push({ resolve:function(data) {
var packetlist = packet.List.fromStructuredClone(data); var packetlist = packet.List.fromStructuredClone(data),
data = new key.Key(packetlist); data = new key.Key(packetlist);
resolve(data); resolve(data);
}, reject:reject }); }, reject:reject });