Switch to b16encode, since b32encode is not b32hexencode

This commit is contained in:
Adam Goldsmith 2022-01-06 19:06:22 -05:00
parent 6d5321491e
commit 4f28ea21fe

View File

@ -1,6 +1,6 @@
from datetime import datetime
import os.path
from base64 import b32encode
from base64 import b16encode
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
@ -47,7 +47,8 @@ class CalendarService:
def insert_or_update_event(
self, calendar_id: str, id: str, title: str, start: datetime, end: datetime
):
event_id = b32encode(id.encode("ascii")).decode("ascii").lower().rstrip("=")
event_id = b16encode(id.encode("ascii")).decode("ascii").lower().rstrip("=")
print(event_id)
event = {
"id": event_id,
"summary": title,