From 59c7076f51ecf42035ac1762ac68f7f99ebff37a Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sat, 30 Aug 2025 00:41:34 -0700 Subject: [PATCH] Remove privatization. --- src/lib/crypto/nano-nacl.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/crypto/nano-nacl.ts b/src/lib/crypto/nano-nacl.ts index 3c82cb4..8ce4bd3 100644 --- a/src/lib/crypto/nano-nacl.ts +++ b/src/lib/crypto/nano-nacl.ts @@ -31,7 +31,7 @@ export class NanoNaCl { * * @returns 0 if first 32 bytes are equal, else 1 if there is at least one bit difference */ - static #vn (x: Uint8Array, y: Uint8Array): number { + static vn (x: Uint8Array, y: Uint8Array): number { let d: number = 0 for (let i = 0; i < 32; i++) { d |= x[i] ^ y[i] @@ -87,7 +87,7 @@ export class NanoNaCl { const d: Uint8Array = new Uint8Array(32) this.pack25519(c, a) this.pack25519(d, b) - return this.#vn(c, d) + return this.vn(c, d) } static pack25519 (out: Uint8Array, n: Float64Array): void { @@ -453,7 +453,7 @@ export class NanoNaCl { n -= 64 // if any bits unequal, zero out and return -1 - const vn = this.#vn(sm, t) ^ 1 + const vn = this.vn(sm, t) ^ 1 for (let i = 0; i < n; i++) { m[i] = sm[i + 64] * vn } -- 2.47.3