From e589c6a5d6f1241a4f98db66b018fc24d6e5cdf3 Mon Sep 17 00:00:00 2001 From: Christophe Diederichs Date: Tue, 16 Jun 2020 16:52:57 +0200 Subject: [PATCH] declare constants about exports --- crypto_scalarmult.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crypto_scalarmult.js b/crypto_scalarmult.js index c98f1c0..f7f41b6 100644 --- a/crypto_scalarmult.js +++ b/crypto_scalarmult.js @@ -1,5 +1,10 @@ const { _9, _121665, gf, inv25519, pack25519, unpack25519, sel25519, A, M, Z, S } = require('./ed25519.js') +var crypto_scalarmult_BYTES = 32 +var crypto_scalarmult_SCALARBYTES = 32 +var crypto_scalarmult_BYTES = 32 +var crypto_scalarmult_SCALARBYTES = 32 + module.exports = { crypto_scalarmult, crypto_scalarmult_base, @@ -70,7 +75,3 @@ function crypto_scalarmult_base (q, n) { function check (buf, len) { if (!buf || (len && buf.length < len)) throw new Error('Argument must be a buffer' + (len ? ' of length ' + len : '')) } -var crypto_scalarmult_BYTES = 32 -var crypto_scalarmult_SCALARBYTES = 32 -var crypto_scalarmult_BYTES = 32 -var crypto_scalarmult_SCALARBYTES = 32