Expand description
HMAC-SHA256 sign/verify for kid:hex tokens.
Token shape is <kid>:<hex-digest> where the digest is
HMAC-SHA256(secret, kid || ":" || message). Verification is
constant-time via ::hmac::Mac::verify_slice.
Enums§
- Hmac
Verify Error - Errors from
hmac_verify. Backend callers map these ontoEngineError::Validation(InvalidInput)at the trait boundary.
Functions§
- hmac_
sign - HMAC-SHA256 signature over
kid || ":" || message. Returns akid:hextoken. - hmac_
verify - Verify a
kid:hextoken. ReturnsOk(())iff the digest matchessecretovermessage. Constant-time comparison.