in modules/crypto.py [0:0]
def decrypt_ends(token: dict) -> dict:
decrypter = Fernet(get_key())
decrypts = []
for key, value in token.items():
if isinstance(value, dict):
decrypts.append((key, decrypt_ends(value)))
elif isinstance(value, str) and value.startswith("[enc]||"):
secret = value.split("||")[1]
decrypts.append((key, decrypter.decrypt(secret.encode()).decode()))
for dec in decrypts:
(key, value) = dec
token[key] = value
return token