larzwebhook
Sign and verify webhook payloads with real HMAC-SHA256.
The same shape real payment/webhook providers use: an X-Signature: HMAC-SHA256(secret, body) header. sign() on the sending side, verify() on the receiving end - two functions, built on the crypto package's real SHA-256/HMAC, not a demo checksum. Pairs with dispatch for a full multi-destination outbound webhook registry.
larzscript pkg install webhook
What you get
- Real HMAC-SHA256, the shape every provider uses
- sign()/verify() - two functions, nothing to misuse
- Built on crypto, not a reimplemented checksum
- Pairs with larzdispatch for multi-app webhook routing
Try it
import "webhook" as webhook
let sig = webhook.sign("{\"a\":1}", "secret")
print(sig)
print(webhook.verify("{\"a\":1}", sig, "secret"))
print(webhook.verify("{\"a\":1}", sig, "wrong-secret"))Output
aa9e2e3575f5d7098b6caccd790888c36d5fdb63342a73bada2d6a51747a8494 true false
Why it's in the Larz Stack
larzwebhook is a real Larzscript package (larzscript pkg install webhook) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.