Skip to content

Commit

Permalink
fix base_padding
Browse files Browse the repository at this point in the history
  • Loading branch information
restran committed Dec 4, 2017
1 parent 1025ec3 commit a87365c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hydrogen/converter/handlers/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit a87365c

Please sign in to comment.