1
0
mirror of https://github.com/mjg59/python-broadlink.git synced 2024-11-22 15:10:12 +01:00

[Critical] Fixes invalid byte string (b) for padding (#97, #107) (#108)

* Fixes invalid byte string (b) for padding (#97, #107)

* Change version to 0.5
This commit is contained in:
mob41 2017-06-14 10:30:27 +08:00 committed by Matthew Garrett
parent f7e30344c5
commit 2e2c8ef1a1
2 changed files with 3 additions and 3 deletions

View File

@ -248,7 +248,7 @@ class device:
# pad the payload for AES encryption
if len(payload)>0:
numpad=(len(payload)//16+1)*16
payload=payload.ljust(numpad,"\x00")
payload=payload.ljust(numpad,b"\x00")
checksum = 0xbeaf
for i in range(len(payload)):

View File

@ -12,11 +12,11 @@ try:
except ImportError as e:
dynamic_requires = ['pycrypto==2.6.1']
version = 0.3
version = 0.5
setup(
name='broadlink',
version=0.4,
version=0.5,
author='Matthew Garrett',
author_email='mjg59@srcf.ucam.org',
url='http://github.com/mjg59/python-broadlink',