def bitlen

bend-collections@1.0.0.0 · src/crypto/curve25519/x25519.bend:98

import bend-collections@1.0.0.0/src/crypto/curve25519/x25519.bend as X25519
import Base

98# 8 len(xs), the bit count of a byte string
99def bitlen(xs: List<&2, U32>) -> Nat:
100  match xs:
101    case Nil{}:
102      0n
103    case Con{x, xt}:
104      Nat.add(8n, bitlen(xt))

Uses (4)

Used by (3)