Sha.zero_count_if: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/spec/crypto/sha.bend as Sha Lines 49-56 of bend-collections@1.0.0.0/spec/crypto/sha.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/spec/crypto/sha.bend&start_line=49&end_line=56 import Base # FIPS padding: a remainder of 0..55 leaves room in this block; # a remainder of 56..63 needs another block. No modular shortcut is used. def zero_count_if(r: Nat, fits: Bool) -> Nat: match fits: case True{}: Nat.sub(55n, r) case False{}: Nat.sub(119n, r) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub