diff --git a/lib/elliptic/utils.js b/lib/elliptic/utils.js index 568a3e2..b3ef2d2 100644 --- a/lib/elliptic/utils.js +++ b/lib/elliptic/utils.js @@ -14,14 +14,15 @@ utils.encode = minUtils.encode; // Represent num in a w-NAF form function getNAF(num, w, bits) { var naf = new Array(Math.max(num.bitLength(), bits) + 1); - for (var i = 0; i < naf.length; i += 1) { + var i; + for (i = 0; i < naf.length; i += 1) { naf[i] = 0; } var ws = 1 << (w + 1); var k = num.clone(); - for (var i = 0; i < naf.length; i++) { + for (i = 0; i < naf.length; i++) { var z; var mod = k.andln(ws - 1); if (k.isOdd()) {