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
+9
View File
@@ -29,6 +29,15 @@ DIGEST_SIZE_384 :: 48
// DIGEST_SIZE_512 is the SHA3-512 digest size.
DIGEST_SIZE_512 :: 64
// BLOCK_SIZE_224 is the SHA3-224 block size in bytes.
BLOCK_SIZE_224 :: _sha3.RATE_224
// BLOCK_SIZE_256 is the SHA3-256 block size in bytes.
BLOCK_SIZE_256 :: _sha3.RATE_256
// BLOCK_SIZE_384 is the SHA3-384 block size in bytes.
BLOCK_SIZE_384 :: _sha3.RATE_384
// BLOCK_SIZE_512 is the SHA3-512 block size in bytes.
BLOCK_SIZE_512 :: _sha3.RATE_512
// Context is a SHA3 instance.
Context :: distinct _sha3.Context