1.26. xor
¶
This module provides basic support for XOR encoding and decoding operations.
1.26.1. Functions¶
-
xor_decode
(data, encoding='utf-8')[source]¶ Decode data using the XOR algorithm. This is not suitable for encryption purposes and should only be used for light obfuscation. This function requires the key to be set as the first byte of data as done in the
xor_encode()
function.Parameters: data (str) – The data to decode. Returns: The decoded data. Return type: str
-
xor_encode
(data, seed_key=None, encoding='utf-8')[source]¶ Encode data using the XOR algorithm. This is not suitable for encryption purposes and should only be used for light obfuscation. The key is prepended to the data as the first byte which is required to be decoded py the
xor_decode()
function.Parameters: Returns: The encoded data.
Return type: