Increase the strictness in the SuiteB SHA padding function.

With the lazier join operator, this squashes a space leak in examples that
do a lot of hashing.
This commit is contained in:
Rob Dockins 2021-04-02 13:14:14 -07:00
parent 77f6718766
commit 5d96829dcd

View File

@ -205,7 +205,7 @@ private
type sha2_padded_size w L = sha2_num_blocks w L * sha2_block_size w
sha2pad : {w, L} (fin w, fin L, w >= 1) => [L] -> [sha2_padded_size w L]
sha2pad M = M # 0b1 # zero # ((fromInteger `L) : [2*w])
sha2pad M = rnf (M # 0b1 # zero # ((fromInteger `L) : [2*w]))
sha2blocks : {w, L} (fin w, fin L, w >= 1) =>
[L] -> [sha2_num_blocks w L][16][w]