The hmac module for keyed message authentication. compare_digest is the only constant-time comparison helper — using ordinary == for MAC comparison is a timing-attack sink.
.compare_digest()Sanitizerhmac.compare_digest(a, b) -> bool
Constant-time comparison. Sanitizer for signature verification flows.
return.new()Neutralhmac.new(key: bytes, msg: bytes = None, digestmod='') -> HMAC
Creates an HMAC instance. Neutral.
| FQN | Field | |
|---|---|---|
| hmac | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
from codepathfinder.go_rule import PyHmac