def run.mac

bend-kit-webhooks@0.11.0.1 · webhooks.bend:256

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

256def run.mac(-A: Data, v: A, pre: String, +sigs: List<&2, String>, +std: Bool, +hex: Bool, secrets: List<&2, String>,
257    r: Bytes.Bytes & Bytes.Bytes) -> IO(Bytes.Bytes & Result<&1, &1, Err, A>):
258  (keep, copy) = r
259  do IO<Bytes.Bytes & Result<&1, &1, Err, A>>:
260    hit : Result<&1, &1, Err, Bool> <-
261      any.key(secrets, std, hex, sigs, Bytes.slice(Bytes.append(Bytes.from_string(pre), copy), 0, 4294967295))
262    return (keep, found(A, hit, v))

Uses (16)

Used by (1)