Skip to main content

verify_signature

Function verify_signature 

Source
pub fn verify_signature(
    header_value: &str,
    body: &[u8],
    secret: &[u8],
) -> Result<(), VerifyError>
Expand description

Verify the X-Hub-Signature-256 against the secret + body.

header_value is the raw header value (e.g., "sha256=abc123..."). body is the raw HTTP body bytes. secret is the shared webhook secret (operator-supplied).

Constant-time comparison. Pure.