From 9ccd3697e302f5e130a139efce74e00248bfd524 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Sun, 24 Nov 2024 22:04:33 -0800 Subject: [PATCH] Rename hash functions to drop in BLAKE2b for nano. --- src/lib/workers/nano25519.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/workers/nano25519.ts b/src/lib/workers/nano25519.ts index a31425f..4a1de78 100644 --- a/src/lib/workers/nano25519.ts +++ b/src/lib/workers/nano25519.ts @@ -1,6 +1,6 @@ // SPDX-FileCopyrightText: 2024 Chris Duncan // SPDX-License-Identifier: GPL-3.0-or-later - +//@ts-nocheck import blake2b from 'blake2b' 'use strict'; @@ -1292,7 +1292,7 @@ import blake2b from 'blake2b' return n; } - function crypto_hash(out, m, n) { + function crypto_hash_sha512(out, m, n) { var hh = new Int32Array(8), hl = new Int32Array(8), x = new Uint8Array(256), @@ -1332,7 +1332,7 @@ import blake2b from 'blake2b' return 0; } - function crypto_hash_blake2b(out, m, n) { + function crypto_hash(out, m, n) { const input = new Uint8Array(n) for (let i = 0; i < n; ++i) { input[i] = m[i] -- 2.34.1