- Improvements working with the cloud, minio, graylog and some first bugfixing

This commit is contained in:
Josako
2024-08-13 09:04:19 +02:00
parent 9caa423bcf
commit ab38dd7540
23 changed files with 414 additions and 220 deletions

View File

@@ -1,7 +1,13 @@
import random
from cryptography.fernet import Fernet
from flask import Flask
def generate_api_key(prefix="EveAI-Chat"):
parts = [str(random.randint(1000, 9999)) for _ in range(5)]
return f"{prefix}-{'-'.join(parts)}"
class SimpleEncryption:
def __init__(self, app: Flask = None):
self.app = app