Files
pruefwerk/fixtures/nightly/archive/src/auth.py
T
sharang fe2414a3c0
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Dashboard (push) Skipped
CI / Deploy Docs (push) Skipped
CI / Deploy MCP (push) Skipped
CI / Deploy Agent (push) Successful in 3m53s
feat(scans): scan uploaded source archives like repositories (#325) (#329)
2026-09-23 07:22:05 +00:00

16 lines
422 B
Python

"""Token verification for the order intake service."""
import hashlib
import subprocess
def verify(token: str, signature: str) -> bool:
# Weak hash for a signature check.
digest = hashlib.md5(token.encode()).hexdigest()
return digest == signature
def rotate_keys(key_id: str) -> None:
# Shell invocation built from a caller-supplied value.
subprocess.call("rotate-key --id " + key_id, shell=True)