I need a way to ignore the 'incorrect padding' exception when trying to decode a base32 string using base64 lib.
I have seen this post Python: Ignore 'Incorrect padding' error when base64 decoding which resolves the problem for base64 (b64decode) decoding. I tried to do the same (add the maximum number of accepted paddings, which if I'm not msitaken is 6 for base32) like this
b32decode(str(decoding) + "======", True, None)
But the exception raises anyway.
The expected result is to have a base32 string decoded anyway even without the correct padding:
decoding = JBSWY3DPEBZXIYLDNMQG65TFOJTGY33XEE== #this string should have 6 '=' as padding
print(b32decode(str(decoding) + "======", True, None))
>> Hello stack overflow!