sign static method
Computes the webhook-signature value for a delivery: v1, followed
by the base64 signature.
Use it to build signed test requests for your webhook handler.
Implementation
static String sign({
required String secret,
required String id,
required DateTime timestamp,
required String body,
}) {
final hmac = _hmacFor(secret);
final seconds = _unixSeconds(timestamp);
return 'v1,${_compute(hmac, id, seconds, utf8.encode(body))}';
}