core/crypto: Expose the block sizes for every hash algorithm

While I just went and made this private, this information is required
for keying HMAC.
This commit is contained in:
Yawning Angel
2024-02-07 00:37:18 +09:00
parent bc160d2eb7
commit 7a8b1669b0
11 changed files with 100 additions and 42 deletions
+4 -1
View File
@@ -17,9 +17,12 @@ package blake2s
import "../_blake2"
// DIGEST_SIZE is the BLAKE2s digest size.
// DIGEST_SIZE is the BLAKE2s digest size in bytes.
DIGEST_SIZE :: 32
// BLOCK_SIZE is the BLAKE2s block size in bytes.
BLOCK_SIZE :: _blake2.BLAKE2S_BLOCK_SIZE
// Context is a BLAKE2s instance.
Context :: _blake2.Blake2s_Context