-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hello,
I see in in /bin/lib/decryptlib.py there is padding check for b64. Would be it possible to add a similar check for b32?
@numargs(0)
def fn_atob(data, args):
data = data.encode() if type(data) == str else data
return base64.b64decode(data + "====".encode()) # b64decode ignores extra padding
@numargs(0)
def fn_b32(data, args):
padding = "=" * (8 - (len(data) % 8)) if len(data) % 8 != 0 else ""
data = data.encode() if type(data) == str else data
return base64.b32decode(data + padding.encode())
malvidin
Metadata
Metadata
Assignees
Labels
No labels