From: Chris Duncan Date: Sat, 22 Aug 2026 06:15:16 +0000 (-0700) Subject: Fix input buffer size references. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=12f22a3751eb658333d89e2e32c2bd8458532c46;p=nano25519.git Fix input buffer size references. --- diff --git a/src/assembly/index.ts b/src/assembly/index.ts index bee7ad4..9184811 100644 --- a/src/assembly/index.ts +++ b/src/assembly/index.ts @@ -5,20 +5,19 @@ import { crypto_derive } from './crypto_derive' import { crypto_sign } from './crypto_sign' import { crypto_verify } from './crypto_verify' -const MESSAGE_BYTES: i32 = 32 const PRIVATEKEY_BYTES: i32 = 32 const PUBLICKEY_BYTES: i32 = 32 const SIGNATURE_BYTES: i32 = 64 // Static I/O buffers -const INPUT_BUFFER_BYTES: i32 = SIGNATURE_BYTES + MESSAGE_BYTES +const INPUT_BUFFER_BYTES: i32 = SIGNATURE_BYTES + PUBLICKEY_BYTES const MESSAGE_BUFFER_BYTES: i32 = 32768 const OUTPUT_BUFFER_BYTES: i32 = SIGNATURE_BYTES const INPUT_BUFFER = new StaticArray(INPUT_BUFFER_BYTES) const MESSAGE_BUFFER = new StaticArray(MESSAGE_BUFFER_BYTES) const OUTPUT_BUFFER = new StaticArray(OUTPUT_BUFFER_BYTES) -/** Returns the pointer to the static input buffer (128 bytes). */ +/** Returns the pointer to the static input buffer (96 bytes). */ export function getInputPointer (): usize { return changetype(INPUT_BUFFER) }