def partial

bend-collections@1.0.0.0 · src/crypto/keccak/keccak.bend:150

import bend-collections@1.0.0.0/src/crypto/keccak/keccak.bend as Keccak
import Base

150# Little-endian Keccak pad10*1, domain suffix 0x01.
151def partial(w: U32, delta: Nat) -> U32:
152  match delta:
153    case 0n: 1
154    case 1n: U32.or(U32.and(w,255),256)
155    case 2n: U32.or(U32.and(w,65535),65536)
156    case 3n: U32.or(U32.and(w,16777215),16777216)
157    case _: w

Uses (4)

Used by (1)