HMAC-SHA256 signing and verification for request authentication.
Summary
Functions
Constant-time string comparison to prevent timing attacks.
Sign a body string with a secret using HMAC-SHA256. Returns a 64-character lowercase hex string.
Verify a signature against a body and secret. Uses constant-time comparison to prevent timing attacks.
Functions
Constant-time string comparison to prevent timing attacks.
Sign a body string with a secret using HMAC-SHA256. Returns a 64-character lowercase hex string.
Verify a signature against a body and secret. Uses constant-time comparison to prevent timing attacks.