def os2ip_go

bend-collections@1.0.0.0 · spec/crypto/secp256k1/curve.bend:194

import bend-collections@1.0.0.0/spec/crypto/secp256k1/curve.bend as Curve
import Base
import bend-collections@1.0.0.0/spec/lib/common.bend as C

194# OS2IP (big-endian)
195def os2ip_go(bs: List<&2, U32>, acc: Nat) -> Nat:
196  match bs:
197    case Nil{}: acc
198    case b <> t: os2ip_go(t, Nat.add(C.shift(8n, acc), byte(b)))

Uses (6)

Used by (1)