expliot.core.vendors.tplink.crypto

Encrypt & Decrypt module for the TP-Link smart device plugins

Module Contents

Functions

encrypt(string)

Encryption of input string which is in JSON format.

decrypt(string)

Decryption of the hex string which was encrypted using XOR cypher.

expliot.core.vendors.tplink.crypto.encrypt(string)

Encryption of input string which is in JSON format. Uses XOR cypher to encrypt.

Args:

string(str): The JSON string to encrypt.

Returns(bytes):

Data to be sent to the TP-Link smart devices.

expliot.core.vendors.tplink.crypto.decrypt(string)

Decryption of the hex string which was encrypted using XOR cypher.

Args:

string(str): Hex string to be decrypted, without the 0x prefix. Ex. 2a3b4cddeeff11.

Returns(str):

Decrypted string which is in JSON format.