From: Chris Duncan Date: Fri, 3 Jul 2026 08:31:34 +0000 (-0700) Subject: Use literal value instead of computing. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=5632152cf6b2f91dac0ad292ff6de02d204dba2d;p=libnemo.git Use literal value instead of computing. --- diff --git a/src/lib/crypto/bip39.ts b/src/lib/crypto/bip39.ts index 37a5f26..9805510 100644 --- a/src/lib/crypto/bip39.ts +++ b/src/lib/crypto/bip39.ts @@ -123,7 +123,7 @@ export class Bip39 { const checksumBits = bits & ((1n << checksumLength) - 1n) if (entropyBits == null || entropyBits < 0n - || entropyBits > (1n << 256n) - 1n + || entropyBits > 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFn || entropyLength < 128n || entropyLength > 256n || Number(entropyLength & 31n) !== 0