From fbc02608820f57396e9da9eb8507a2bccf5105bb Mon Sep 17 00:00:00 2001 From: Nikos Sklikas Date: Thu, 19 May 2022 15:01:02 +0300 Subject: [PATCH] Allow key passthrough --- src/idpyoidc/encrypter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/idpyoidc/encrypter.py b/src/idpyoidc/encrypter.py index 6a757149..f9a2052a 100644 --- a/src/idpyoidc/encrypter.py +++ b/src/idpyoidc/encrypter.py @@ -88,6 +88,8 @@ def init_encrypter(conf: Optional[dict] = None): _kwargs[usage] = _key[0].key else: _kwargs[usage] = os.urandom(16) + elif "key" in _cargs: + _kwargs = {"key": _cargs["key"]} else: _kwargs = { usage: _cargs.get(usage, os.urandom(16)) for usage in ["password", "salt"]