Skip to content

Commit

Permalink
Merge pull request #26 from rwth-iat/http_api/improve_base64url_encode
Browse files Browse the repository at this point in the history
adapter.http: change `base64url_encode()` function to return `str`
  • Loading branch information
jkhsjdhjs committed Mar 27, 2024
2 parents b53783a + bae8fbc commit acd123d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions basyx/aas/adapter/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit acd123d

Please sign in to comment.