def base64_decode(input, errors='strict'): assert errors == 'strict' return (base64.decodebytes(input), len(input))