Skip to content

Commit

Permalink
more python3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sspiff committed Jan 8, 2024
1 parent aa2fe22 commit 98be1eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pwh_wordify/pwh_wordify.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ def _basic_encoder(pwh, params, keymaterial):

def _base64_encode(pwh, params, keymaterial, isencoder=False):
if not isencoder: raise ValueError
ekm = base64.b64encode(keymaterial, params['altchars'])
ekm = base64.b64encode(keymaterial, params['altchars'].encode())
# ignore any final padding
return ekm[:-4]
return ekm[:-4].decode()


def _base32_encode(pwh, params, keymaterial, isencoder=False):
if not isencoder: raise ValueError
ekm = base64.b32encode(keymaterial)
# ignore any final padding
return ekm[:-8]
return ekm[:-8].decode()


def _mindex1_encode(pwh, params, keymaterial, isencoder=False):
Expand Down

0 comments on commit 98be1eb

Please sign in to comment.