import time import hmac import hashlib from dataclasses import dataclass from typing import Any @dataclass class AuditLogEntry: timestamp: float action: str details: str class Signer: def __init__(self, key: str) -> None: self.key = key.encode("utf-8") def sign(self, message: str) -> str: return hmac.new(self.key, message.encode("utf-8"), hashlib.sha256).hexdigest()