diff --git a/hydrogen/converter/handlers/converter.py b/hydrogen/converter/handlers/converter.py index f67e163..920f80b 100644 --- a/hydrogen/converter/handlers/converter.py +++ b/hydrogen/converter/handlers/converter.py @@ -12,10 +12,10 @@ def base_padding(data, length=4): + data = utf8(data) if len(data) % length != 0: - data = '%s%s' % (data, '=' * (length - len(data) % length)) + data = data + b'=' * (length - len(data) % length) - data = utf8(data) return data