def hmac

bend-collections@1.0.0.0 · spec/crypto/secp256k1/ecdsa.bend:47

import bend-collections@1.0.0.0/spec/crypto/secp256k1/ecdsa.bend as Ecdsa
import Base
import bend-collections@1.0.0.0/spec/crypto/hmac.bend as HM

47# HMAC-SHA256 (the key is looked at first; the value is HM.hmac's)
48def hmac(key: List<&2, U32>, msg: List<&2, U32>) -> List<&2, U32>:
49  match key:
50    case Nil{}: HM.hmac(Nil{}, msg)
51    case k <> t: HM.hmac(k <> t, msg)

Uses (3)

Used by (4)