From 699229cae9e31cc5651270bdf91f6f2c17f8e931 Mon Sep 17 00:00:00 2001 From: griga Date: Wed, 15 May 2024 18:17:44 +0300 Subject: [PATCH] fix message initialization bug in test/04-secretbox.quick.js; --- test/04-secretbox.quick.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/04-secretbox.quick.js b/test/04-secretbox.quick.js index 8d5b34f9..a9cf990c 100644 --- a/test/04-secretbox.quick.js +++ b/test/04-secretbox.quick.js @@ -58,7 +58,7 @@ test('nacl.secretbox with message lengths of 0 to 1024', function(t) { for (i = 0; i < key.length; i++) key[i] = i & 0xff; var nonce = new Uint8Array(nacl.secretbox.nonceLength); var fullMsg = new Uint8Array(1024); - for (i = 0; i < fullMsg; i++) fullMsg[i] = i & 0xff; + for (i = 0; i < fullMsg.length; i++) fullMsg[i] = i & 0xff; for (i = 0; i < fullMsg.length; i++) { var msg = fullMsg.subarray(0, i); var box = nacl.secretbox(msg, nonce, key);