Michael.hs.michael.pad: def of bend-osdev-hashes@0.1.0.0 Import: import bend-osdev-hashes@0.1.0.0/michael.bend as Michael Lines 67-70 of bend-osdev-hashes@0.1.0.0/michael.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-hashes@0.1.0.0/michael.bend&start_line=67&end_line=70 import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B # the padding after cnt bytes of an unfinished word: 0x5a, then four to # seven zeros, to a whole number of words def hs.michael.pad(cnt: U32) -> List<&2, U32>: Con{90, B.zeros(U32.to_nat(U32.add(4, U32.and(U32.sub(3, cnt), 3))))} Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=zeros