2
0
mirror of https://github.com/softScheck/tplink-smartplug synced 2026-01-11 23:38:46 +01:00

Added Comments to easily identify code sections

This commit is contained in:
Samuel Tseng
2020-02-20 00:04:56 -08:00
parent 2ab78544ae
commit cef33b8425

View File

@@ -52,6 +52,7 @@ commands = {'info' : '{"system":{"get_sysinfo":{}}}',
# Encryption and Decryption of TP-Link Smart Home Protocol # Encryption and Decryption of TP-Link Smart Home Protocol
# XOR Autokey Cipher with starting key = 171 # XOR Autokey Cipher with starting key = 171
# Python 3.x Version
if sys.version_info[0] > 2: if sys.version_info[0] > 2:
def encrypt(string): def encrypt(string):
key = 171 key = 171
@@ -71,6 +72,7 @@ if sys.version_info[0] > 2:
result += chr(a) result += chr(a)
return result return result
# Python 2.x Version
else: else:
def encrypt(string): def encrypt(string):
key = 171 key = 171