Skip to content

Commit

Permalink
Try to appease pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsteven committed Oct 5, 2021
1 parent 2a6ec96 commit c66a8c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pwnlib/data/kctf/pow.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ def sloth_square(x, diff, p):
def encode_number(num):
size = (num.bit_length() // 24) * 3 + 3
# return str(base64.b64encode(num.to_bytes(size, 'big')), 'utf-8')
return six.ensure_str(base64.b64encode(packing.pack(num, size * 8, endian='big')), 'utf-8')
return six.ensure_str(base64.b64encode(packing.pack(num, size * 8, endianness='big')), 'utf-8')

def decode_number(enc):
# return int.from_bytes(base64.b64decode(bytes(enc, 'utf-8')), 'big')
return packing.unpack(base64.b64decode(six.ensure_binary(enc, 'utf-8')), 'all', endian='big')
return packing.unpack(base64.b64decode(six.ensure_binary(enc, 'utf-8')), 'all', endianness='big')

def decode_challenge(enc):
dec = enc.split('.')
Expand Down

0 comments on commit c66a8c6

Please sign in to comment.