def lc.byte
import bend-osdev-cipher-core@0.1.0.0/cipher_core.bend as CipherCoreimport Base
42# byte n of x, counting from the least significant (n = 0 to 3)
43def lc.byte(x: U32, n: Nat) -> U32:
44 U32.and(255, U32.shrn(x, Nat.mul(8n, n)))
import bend-osdev-cipher-core@0.1.0.0/cipher_core.bend as CipherCoreimport Base
42# byte n of x, counting from the least significant (n = 0 to 3)
43def lc.byte(x: U32, n: Nat) -> U32:
44 U32.and(255, U32.shrn(x, Nat.mul(8n, n)))