def sign.mac
bend-kit-webhooks@0.11.0.1 · webhooks.bend:317
import bend-kit-webhooks@0.11.0.1/webhooks.bend as Webhooks
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
317def sign.mac(k: Bytes.Bytes, +id: String, +ts: String, r: Bytes.Bytes & Bytes.Bytes) ->
318 IO(Bytes.Bytes & Result<&1, &1, Err, Map<&2, List<&2, String>>>):
319 (keep, copy) = r
320 do IO<Bytes.Bytes & Result<&1, &1, Err, Map<&2, List<&2, String>>>>:
321 m : Result<&1, &1, Err, Bytes.Bytes> <- mac(k, Bytes.append(Bytes.from_string(id ++ "." ++ ts ++ "."), copy))
322 return (keep, sign.headers(id, ts, m))