From: Chris Duncan Date: Mon, 25 Nov 2024 06:04:33 +0000 (-0800) Subject: Rename hash functions to drop in BLAKE2b for nano. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=9ccd3697e302f5e130a139efce74e00248bfd524;p=libnemo.git Rename hash functions to drop in BLAKE2b for nano. --- 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]