def lc.byte

bend-osdev-legacy-ciphers@0.1.0.0 · legacy_ciphers.bend:45

import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as LegacyCiphers
import Base

45# byte n of x, counting from the least significant (n = 0 to 3)
46def lc.byte(x: U32, n: Nat) -> U32:
47  U32.and(255, U32.shrn(x, Nat.mul(8n, n)))

Uses (5)

Used by (8)