From f56321821c675f937cf75e6d3a240a2f7a03c31f Mon Sep 17 00:00:00 2001 From: Theron Spiegl Date: Thu, 14 Jan 2021 20:40:16 -0600 Subject: [PATCH] fix bit shift, although oddly both work --- crypto_core_hchacha20.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_core_hchacha20.js b/crypto_core_hchacha20.js index 5966f06..d9c91b8 100644 --- a/crypto_core_hchacha20.js +++ b/crypto_core_hchacha20.js @@ -12,7 +12,7 @@ const crypto_core_hchacha20_CONSTBYTES = 16 function ROTL32 (x, b) { x &= 0xFFFFFFFF b &= 0xFFFFFFFF - return (x << b) | (x >>> (64 - b)) + return (x << b) | (x >>> (32 - b)) } function LOAD32_LE (src, offset) {