import hmac
import hashlib


def sign(base: bytes, private_key: str) -> str:
    """Calculate callback signature"""
    return hmac.new(
      bytes(private_key, "utf-8"),
      base,
      hashlib.sha256
    ).hexdigest()