]> git.codecow.com Git - nano25519.git/commitdiff
Fix shadowed loop counter.
authorChris Duncan <chris@codecow.com>
Thu, 27 Aug 2026 17:06:12 +0000 (10:06 -0700)
committerChris Duncan <chris@codecow.com>
Thu, 27 Aug 2026 17:06:12 +0000 (10:06 -0700)
test/index.html

index c74d0911c81ab6fdc1c0da6bb3e05bcdcdf350cf..99b4512045a709dcd89f9f437573df6e5931a83a 100644 (file)
@@ -380,10 +380,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
                                                if (api === 'nano25519 with bulk block verification') {
                                                        publicKey = derive(privateKey, 'nano25519')
                                                        const blocks = []
-                                                       for (let i = 0; i < 32; i++) {
+                                                       for (let b = 0; blockhash < 32; b++) {
                                                                blockHash = random()
                                                                signature = sign(blockHash, privateKey, publicKey, 'nano25519')
-                                                               blocks[i] = { hash: blockHash, signature }
+                                                               blocks[b] = { hash: blockHash, signature }
                                                        }
                                                        start = performance.now()
                                                        const verified = nano25519.verify_blocks(publicKey, blocks)