Private
Public Access
1
0

adding more links to courses and selecting which users to see

This commit is contained in:
2024-10-31 16:03:48 +01:00
parent 11e5a851e1
commit f1cf8d47c0
5 changed files with 89 additions and 1 deletions

View File

@@ -43,6 +43,8 @@ class OpaqueEncoder:
def encode_hex(self, i):
"""Transcode an integer and return it as an 8-character hex string."""
if i is None:
return None
return "%08x" % self.transcode(i)
def encode_base64(self, i): # pragma: no cover
@@ -51,6 +53,8 @@ class OpaqueEncoder:
def decode_hex(self, s):
"""Decode an 8-character hex string, returning the original integer."""
if s is None:
return None
return self.transcode(int(str(s), 16))
def decode_base64(self, s): # pragma: no cover