release 1.0.0

- bump python-version to 3.14
- bump streamlit to 1.52.2
- bump numpy to 2.4.0
- extra-script for generating special-wb's
- rework of container to use a python-virtual-environment and create the special-wb's at first start of the container (no longer at first web-request)
- adding links to source-code and docker-registry's in welcome-message
- some more error-handling for ADFG(V)X
This commit is contained in:
2025-12-25 18:52:23 +01:00
parent 79c3cb83c7
commit 6bac7839d3
11 changed files with 136 additions and 93 deletions

View File

@@ -2309,6 +2309,8 @@ def adfgx_kodieren(eingabetext, pw):
return ":red[Es es werden genau zwei durch Komma getrennte Passwörter benötigt!]"
pw[0] = pw[0].strip()
pw[1] = pw[1].strip()
if not pw[0].isalpha() or not pw[1].isalpha():
return ":red[Passwörter dürfen nur aus Buchstaben bestehen!]"
pw1az = ""
for b in pw[0] + alpha_az:
if b in alpha_az and b not in pw1az:
@@ -2334,7 +2336,6 @@ def adfgx_kodieren(eingabetext, pw):
ctext1az = ""
for b in klartext:
ctext1az += w_baz[b]
print(ctext1az)
ctext1za = ""
for b in klartext:
ctext1za += w_bza[b]
@@ -2370,7 +2371,8 @@ def adfgx_kodieren(eingabetext, pw):
else:
ausgabe_za += i[j + 1]
z += 1
ausgabetext = f":blue[Passwort 1:] {pw[0]} \n"
ausgabetext = f":blue[verwendeter Eingabetext:] {klartext} \n"
ausgabetext += f":blue[Passwort 1:] {pw[0]} \n"
ausgabetext += f":blue[Passwort 2:] {pw2} \n \n"
ausgabetext += f":blue[kodiert mit Variante A-Z:] \n{ausgabe_az} \n \n"
ausgabetext += f":blue[kodiert mit Variante Z-A:] \n{ausgabe_za}"
@@ -2390,6 +2392,7 @@ def adfgx_dekodieren(eingabetext, pw):
alpha_za = "ZYXWVUTSRQPONMLKIHGFEDCBA"
text = text.upper()
text = text.replace("J", "I")
text = text.replace(" ", "")
pw = pw.upper()
pw = pw.replace("J", "I")
pw = pw.split(",")
@@ -2397,6 +2400,11 @@ def adfgx_dekodieren(eingabetext, pw):
return ":red[Es es werden genau zwei durch Komma getrennte Passwörter benötigt!]"
pw[0] = pw[0].strip()
pw[1] = pw[1].strip()
if not pw[0].isalpha() or not pw[1].isalpha():
return ":red[Passwörter dürfen nur aus Buchstaben bestehen!]"
for zeichen in text:
if zeichen not in "ADFGX":
return ":red[Im Eingabetext dürfen nur Leerzeichen und die Buchstaben ADFGX vorkommen!]"
pw1az = ""
for b in pw[0] + alpha_az:
if b in alpha_az and b not in pw1az:
@@ -2466,6 +2474,8 @@ def adfgvx_kodieren(eingabetext, pw):
return ":red[Es es werden genau zwei durch Komma getrennte Passwörter benötigt!]"
pw[0] = pw[0].strip()
pw[1] = pw[1].strip()
if not pw[0].isalnum() or not pw[1].isalnum():
return ":red[Passwörter dürfen nur aus Buchstaben und Ziffern bestehen!]"
pw1az09 = ""
for b in pw[0] + alpha_az09:
if b in alpha_az09 and b not in pw1az09:
@@ -2526,7 +2536,8 @@ def adfgvx_kodieren(eingabetext, pw):
else:
ausgabe_90za += i[j + 1]
z += 1
ausgabetext = f":blue[Passwort 1:] {pw[0]} \n"
ausgabetext = f":blue[verwendeter Eingabetext:] {klartext} \n"
ausgabetext += f":blue[Passwort 1:] {pw[0]} \n"
ausgabetext += f":blue[Passwort 2:] {pw2} \n \n"
ausgabetext += f":blue[kodiert mit Variante A-Z,0-9:] \n{ausgabe_az09} \n \n"
ausgabetext += f":blue[kodiert mit Variante 9-0,Z-A:] \n{ausgabe_90za}"
@@ -2546,12 +2557,18 @@ def adfgvx_dekodieren(eingabetext, pw):
alpha_az09 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
alpha_90za = "9876543210ZYXWVUTSRQPONMLKJIHGFEDCBA"
text = text.upper()
text = text.replace(" ", "")
pw = pw.upper()
pw = pw.split(",")
if len(pw) != 2:
return ":red[Es es werden genau zwei durch Komma getrennte Passwörter benötigt!]"
pw[0] = pw[0].strip()
pw[1] = pw[1].strip()
if not pw[0].isalnum() or not pw[1].isalnum():
return ":red[Passwörter dürfen nur aus Buchstaben und Ziffern bestehen!]"
for zeichen in text:
if zeichen not in "ADFGVX":
return ":red[Im Eingabetext dürfen nur Leerzeichen und die Buchstaben ADFGVX vorkommen!]"
pw1az09 = ""
for b in pw[0] + alpha_az09:
if b in alpha_az09 and b not in pw1az09: