From 049ab1a9cc259b05203d72776b0f7477c7967c2e Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 13 Aug 2025 14:48:19 -0700 Subject: [PATCH] Condense declarations. --- src/lib/crypto/nano-nacl.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/lib/crypto/nano-nacl.ts b/src/lib/crypto/nano-nacl.ts index c45b019..d39c1cf 100644 --- a/src/lib/crypto/nano-nacl.ts +++ b/src/lib/crypto/nano-nacl.ts @@ -48,9 +48,8 @@ export class NanoNaCl { } static car25519 (o: BigInt64Array): void { - let v: bigint - let c: bigint = 0n - let s: bigint = 1n << 16n + let v, c, s = 1n << 16n + c = 0n for (let i = 0; i < 16; i++) { v = o[i] + c + s o[i] = v % s @@ -140,9 +139,7 @@ export class NanoNaCl { } static Multiply (o: BigInt64Array, a: BigInt64Array, b: BigInt64Array): void { - let v: bigint - let c: bigint - const s: bigint = 1n << 16n + let v, c, s: bigint = 1n << 16n const t: BigInt64Array = new BigInt64Array(31) t.fill(0n) @@ -181,9 +178,7 @@ export class NanoNaCl { } static Square (o: BigInt64Array, a: BigInt64Array): void { - let v: bigint - let c: bigint - const s: bigint = 1n << 16n + let v, c, s: bigint = 1n << 16n const t: BigInt64Array = new BigInt64Array(31) t.fill(0n) -- 2.47.3