def zero_count_if
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/sha.bend as Shaimport Base
49# FIPS padding: a remainder of 0..55 leaves room in this block;
50# a remainder of 56..63 needs another block. No modular shortcut is used.
51def zero_count_if(r: Nat, fits: Bool) -> Nat:
52 match fits:
53 case True{}:
54 Nat.sub(55n, r)
55 case False{}:
56 Nat.sub(119n, r)