From 4812a4cba433947b229fab5e58ca4014c6058b1f Mon Sep 17 00:00:00 2001
From: Chris Duncan <chris@zoso.dev>
Date: Tue, 26 Nov 2024 12:04:47 -0800
Subject: [PATCH] Move constants to top.

---
 src/lib/blake2b.ts | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/lib/blake2b.ts b/src/lib/blake2b.ts
index 78fea34..cc7a2f5 100644
--- a/src/lib/blake2b.ts
+++ b/src/lib/blake2b.ts
@@ -12,6 +12,13 @@
 // TypeScript, and bundle into web workers.
 // Original source commit: https://github.com/emilbayes/blake2b/blob/1f63e02e3f226642959506cdaa67c8819ff145cd/index.js
 
+const BYTES_MIN = 16
+const BYTES_MAX = 64
+const KEYBYTES_MIN = 16
+const KEYBYTES_MAX = 64
+const SALTBYTES = 16
+const PERSONALBYTES = 16
+
 // 64-bit unsigned addition
 // Sets v[a,a+1] += v[b,b+1]
 // v should be a Uint32Array
@@ -313,12 +320,3 @@ export default function createHash (outlen, key?, salt?, personal?, noAssert?) {
 
 	return new Proto(outlen, key, salt, personal)
 }
-
-var BYTES_MIN = module.exports.BYTES_MIN = 16
-var BYTES_MAX = module.exports.BYTES_MAX = 64
-var BYTES = module.exports.BYTES = 32
-var KEYBYTES_MIN = module.exports.KEYBYTES_MIN = 16
-var KEYBYTES_MAX = module.exports.KEYBYTES_MAX = 64
-var KEYBYTES = module.exports.KEYBYTES = 32
-var SALTBYTES = module.exports.SALTBYTES = 16
-var PERSONALBYTES = module.exports.PERSONALBYTES = 16
-- 
2.34.1