Skip to content

Commit 7e9535b

Browse files
author
Anders Jensen
authored
Renamed argument l to pad_to
1 parent 0bed62b commit 7e9535b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/py_vapid/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ def b64urlencode(data):
2626
return base64.urlsafe_b64encode(data).replace(b'=', b'').decode('utf8')
2727

2828

29-
def num_to_bytes(n, l):
29+
def num_to_bytes(n, pad_to):
3030
"""Returns the byte representation of an integer, in big-endian order.
3131
:param n: The integer to encode.
3232
:type n: int
33-
:param l: Expected length of result, zeropad if necessary.
34-
:type l: int
33+
:param pad_to: Expected length of result, zeropad if necessary.
34+
:type pad_to: int
3535
:returns bytes
3636
"""
3737
h = '%x' % n
3838
r = binascii.unhexlify('0' * (len(h) % 2) + h)
39-
return b'\x00' * (l - len(r)) + r
39+
return b'\x00' * (pad_to - len(r)) + r

0 commit comments

Comments
 (0)