commit 6bc91dfbef60f032e88e9b7910b4fc9d3bc9af95
parent b783b1892a8b73cea5c14caa20b865c73570d1fe
Author: Armin Preiml <apreiml@strohwolke.at>
Date: Tue, 7 May 2024 21:16:09 +0200
crypto::sha512: export BLOCKSZ
Similar to the other hash functions. Required to statically alloc space
for functions like crypto::hmac.
Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/crypto/sha512/sha512.ha b/crypto/sha512/sha512.ha
@@ -26,7 +26,10 @@ export def SZ256: size = 32;
// The size, in bytes, of a SHA-384 checksum.
export def SZ384: size = 48;
-def chunk: size = 128;
+// The internal block size.
+export def BLOCKSZ: size = 128;
+
+def chunk: size = BLOCKSZ;
def init0: u64 = 0x6a09e667f3bcc908;
def init1: u64 = 0xbb67ae8584caa73b;
def init2: u64 = 0x3c6ef372fe94f82b;