aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/url_digest.py
diff options
context:
space:
mode:
authorDennis Fink2026-11-12 19:57:08 +0100
committerDennis Fink2026-11-12 19:57:08 +0100
commit4bd1d9e348918b2e55db47a1ac3489d035cf55e2 (patch)
treef7ed41a374a8a4136792039a262dc62aa8cf8c59 /webmentions_ssg/url_digest.py
parent7035e9f9467684cccae2b7ff3faaa62e6a9f91aa (diff)
downloadwebmentions-ssg-4bd1d9e348918b2e55db47a1ac3489d035cf55e2.tar.gz
webmentions-ssg-4bd1d9e348918b2e55db47a1ac3489d035cf55e2.zip
refactor(core): split modules by responsibility
Break up monolithic views, task helpers, networking, CLI, and application extension setup so each module owns a focused concern. Reorganize the test suite around the new boundaries while preserving existing Webmention behavior and coverage.
Diffstat (limited to '')
-rw-r--r--webmentions_ssg/url_digest.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/webmentions_ssg/url_digest.py b/webmentions_ssg/url_digest.py
deleted file mode 100644
index 256d037..0000000
--- a/webmentions_ssg/url_digest.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me>
-#
-# SPDX-License-Identifier: BSD-3-Clause
-
-"""Portable SHA-256 fingerprints for indexed Webmention URLs."""
-
-import hashlib
-import json
-
-
-def received_url_digest(source: str, target: str) -> str:
- """Fingerprint an unambiguous, ordered source/target pair."""
- encoded = json.dumps(
- [source, target], ensure_ascii=False, separators=(",", ":")
- ).encode("utf-8")
- return hashlib.sha256(encoded).hexdigest()
-
-
-def sent_target_digest(target: str) -> str:
- """Fingerprint an outgoing target (unique within each source ID)."""
- return hashlib.sha256(target.encode("utf-8")).hexdigest()