def key.std

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

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

139# A Standard Webhooks secret: whsec_ then base64 of the key, padded or not. The prefix is optional.
140def key.std(+s: String) -> Maybe<&1, Bytes.Bytes>:
141  nonempty(b64(pad(Bool.pick(String, String.starts_with(s, "whsec_"), String.drop(s, 6n), s))))

Uses (9)

Used by (2)