Metadata-Version: 2.4
Name: serp-hmac
Version: 0.1.0
Summary: Serpentine hmac drop-in: keyed HMAC-SHA256/SHA1/MD5 and constant-time compare_digest (runtime-backed; stdlib delegate under CPython)
Author: Serpentine contributors
License: MIT
Project-URL: Homepage, https://github.com/avijitbhuin21/Serpentine
Keywords: serpentine,hmac,crypto
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: serpentine-shim
Requires-Dist: serp-hashlib>=0.2.0

# serp-hmac

Drop-in replacement for Python's `hmac` module for [Serpentine](https://github.com/avijitbhuin21/Serpentine).

```python
from serp_hmac import new, compare_digest

mac = new(b"secret", b"payload", "sha256")
print(mac.hexdigest())
print(compare_digest(mac.digest(), mac.digest()))
```

Native builds compute HMAC and the constant-time comparison in the Serpentine runtime;
under CPython the same file delegates to the stdlib `hmac`.

Caps: `digestmod` is a name string (`"sha256"`, `"sha1"`, `"md5"`); `compare_digest` takes bytes.
