Skip to content

Commit

Permalink
fix "for in"
Browse files Browse the repository at this point in the history
  • Loading branch information
rzcoder committed Dec 10, 2014
1 parent d028184 commit 31593c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-rsa",
"version": "0.2.12",
"version": "0.2.13",
"description": "Node.js RSA library",
"main": "src/NodeRSA.js",
"scripts": {
Expand Down
7 changes: 1 addition & 6 deletions src/libs/rsa.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ module.exports.Key = (function() {
}
}

for(var i in buffers) {
for(var i = 0; i < buffers.length; i++) {
var buf = buffers[i];

var m = new BigInteger(this.encryptionScheme.encPad(buf));
Expand All @@ -232,11 +232,6 @@ module.exports.Key = (function() {
}

var encryptedBuffer = c.toBuffer(this.encryptedDataLength);
/*var encryptedBuffer = c.toBuffer(true);
while (encryptedBuffer.length < this.encryptedDataLength) {
encryptedBuffer = Buffer.concat([new Buffer([0]), encryptedBuffer]);
}*/

results.push(encryptedBuffer);
}

Expand Down

0 comments on commit 31593c0

Please sign in to comment.