From bae8fbcacb68a5f7a0f3ab162fc73fe5e62885c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20M=C3=B6ller?= Date: Wed, 20 Mar 2024 22:29:22 +0100 Subject: [PATCH] adapter.http: change `base64url_encode()` function to return `str` --- basyx/aas/adapter/http.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basyx/aas/adapter/http.py b/basyx/aas/adapter/http.py index 7095d13a2..5ca74971f 100644 --- a/basyx/aas/adapter/http.py +++ b/basyx/aas/adapter/http.py @@ -235,8 +235,8 @@ def base64url_decode(data: str) -> str: return decoded -def base64url_encode(data: str) -> bytes: - encoded = base64.urlsafe_b64encode(data.encode(BASE64URL_ENCODING)) +def base64url_encode(data: str) -> str: + encoded = base64.urlsafe_b64encode(data.encode(BASE64URL_ENCODING)).decode("ascii") return encoded