lazy init encryption

This commit is contained in:
Kenneth Kehl
2025-10-06 15:06:39 -07:00
parent b75da2cb43
commit 2336578fd3

View File

@@ -159,7 +159,9 @@ def get_encryption():
fake_app = FakeEncryptionApp()
sekret = "SEKRET_KEY"
sekret = sekret.replace("KR", "CR")
fake_config = {"DANGEROUS_SALT": "SALTYSALTYSALTYSALTY", sekret: "FooFoo"} # noqa
ds = os.environ.get("DANGEROUS_SALT")
sk = os.environ.get(sekret)
fake_config = {"DANGEROUS_SALT": ds, sekret: sk} # noqa
print(hilite(f"FAKE CONFIG is {fake_config}"))
fake_app.init_fake_encryption_app(fake_config)
encryption.init_app(fake_app)