From 25c97802f4ef4eb56c1298871804421035ae598d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Isager=20Dalsgar=C3=B0?= Date: Thu, 4 Nov 2021 18:17:13 +0100 Subject: [PATCH] `crypto_sign`: replace `Buffer.alloc()` with `new Uint8Array()` (#62) --- crypto_sign.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto_sign.js b/crypto_sign.js index 30886e4..c4ee49f 100644 --- a/crypto_sign.js +++ b/crypto_sign.js @@ -452,7 +452,7 @@ function crypto_sign_ed25519_sk_to_curve25519 (curveSk, edSk) { assert(curveSk && curveSk.byteLength === crypto_scalarmult_BYTES, "curveSk must be 'crypto_sign_SECRETKEYBYTES' long") assert(edSk && edSk.byteLength === crypto_sign_ed25519_SECRETKEYBYTES, "edSk must be 'crypto_sign_ed25519_SECRETKEYBYTES' long") - var h = Buffer.alloc(crypto_hash_sha512_BYTES) + var h = new Uint8Array(crypto_hash_sha512_BYTES) crypto_hash(h, edSk, 32) h[0] &= 248