def bit_length

mylsm-lsm-store@0.6.0.1 · src/hub_sha/core.bend:255

import mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend as Core
import Base

255# Handle bit length in the SHA-256 compression implementation.
256def bit_length(+byte_length: Nat) -> List<&2, U32>:
257  length_octets(7n, Nat.div(byte_length, 32n),
258    [U32.shln(U32.from_nat(Nat.mod(byte_length, 32n)), 3n)])

Uses (8)

Used by (2)