Weboberflaeche: self-contained, client-side, CLI-kompatibel

Eine einzelne index.html ohne Framework/CDN. Krypto + LSB-Steganografie
laufen komplett im Browser (iOS-tauglich). Format-identisch zum CLI;
Byte-Interop in beide Richtungen per Node-Test gegen das Python-CLI
abgesichert (laedt den Krypto-Kern direkt aus der ausgelieferten index.html).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 21:18:14 +00:00
parent d5e7c979d8
commit ad0b309acf
5 changed files with 496 additions and 0 deletions

18
web/_interop_rawrgb.py Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env python3
"""Test-Helfer: PNG <-> rohes RGB-Byte-Array (nur für den Interop-Test)."""
import sys
from PIL import Image
if sys.argv[1] == "png2rgb": # png2rgb <in.png> <out.bin> -> stdout: "W H"
img = Image.open(sys.argv[2]).convert("RGB")
w, h = img.size
with open(sys.argv[3], "wb") as fh:
fh.write(bytes([v for px in img.getdata() for v in px]))
print(w, h)
elif sys.argv[1] == "rgb2png": # rgb2png <in.bin> <W> <H> <out.png>
w, h = int(sys.argv[3]), int(sys.argv[4])
data = open(sys.argv[2], "rb").read()
img = Image.new("RGB", (w, h))
img.putdata([tuple(data[i:i + 3]) for i in range(0, len(data), 3)])
img.save(sys.argv[5], "PNG")
print("ok")