def low_tail

bend-collections@1.0.0.0 · spec/crypto/keccak/main.bend:8

import bend-collections@1.0.0.0/spec/crypto/keccak/main.bend as BendCollections
import Base

8def low_tail(w: U32, n: Nat) -> U32:
9  match n:
10    case 0n: 1
11    case 1n: U32.or(U32.and(w,255),256)
12    case 2n: U32.or(U32.and(w,65535),65536)
13    case 3n: U32.or(U32.and(w,16777215),16777216)
14    case _: w

Uses (4)

Used by (1)