From 2418872e1cd03e8604225516d92f715c3da19aa7 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 25 Aug 2026 11:49:03 -0700 Subject: [PATCH] Update nano25519 sign test to properly pass private and public keys separately. --- test/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/index.html b/test/index.html index 9e5c513..7ece983 100644 --- a/test/index.html +++ b/test/index.html @@ -152,9 +152,11 @@ SPDX-License-Identifier: GPL-3.0-or-later const sign = (h, sk, pk, api) => { const h8 = new Uint8Array(h.match(/.{2}/g).map(b => parseInt(b, 16))) const sk8 = new Uint8Array((sk + pk).match(/.{2}/g).map(b => parseInt(b, 16))) + const prv8 = new Uint8Array(sk.match(/.{2}/g).map(b => parseInt(b, 16))) + const pub8 = new Uint8Array(pk.match(/.{2}/g).map(b => parseInt(b, 16))) switch (api) { case 'nano25519': { - const s8 = nano25519.sign(h8, sk8) + const s8 = nano25519.sign(h8, prv8, pub8) return [...s8].map(b => b.toString(16).padStart(2, '0')).join('') } case 'NanocurrencyWeb': { @@ -215,7 +217,7 @@ SPDX-License-Identifier: GPL-3.0-or-later return end - start } - export function test(api, size, runs) { + export async function test(api, size, runs) { if (typeof size !== 'number' || size < 1) { size = 1 } -- 2.52.0