pssecret-server/pssecret_server/fernet.py
Ivan Golikov f0be12394c Linting
2025-01-03 15:32:01 +01:00

10 lines
291 B
Python

from typing import Annotated
from cryptography.fernet import Fernet
from fastapi import Depends
from pssecret_server.settings import Settings, get_settings
def get_fernet(settings: Annotated[Settings, Depends(get_settings)]) -> Fernet:
return Fernet(settings.secrets_encryption_key)