We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a78e03 commit 206da2eCopy full SHA for 206da2e
lib/elliptic/utils.js
@@ -14,14 +14,15 @@ utils.encode = minUtils.encode;
14
// Represent num in a w-NAF form
15
function getNAF(num, w, bits) {
16
var naf = new Array(Math.max(num.bitLength(), bits) + 1);
17
- for (var i = 0; i < naf.length; i += 1) {
+ var i;
18
+ for (i = 0; i < naf.length; i += 1) {
19
naf[i] = 0;
20
}
21
22
var ws = 1 << (w + 1);
23
var k = num.clone();
24
- for (var i = 0; i < naf.length; i++) {
25
+ for (i = 0; i < naf.length; i++) {
26
var z;
27
var mod = k.andln(ws - 1);
28
if (k.isOdd()) {
0 commit comments