A simple XOR string encryption library based on the JavaScript library XOR-Crypt by RobLoach but in Python.
pip install xorCryptPy
You can also download the package manually from PyPI.
Works exactly like the JavaScript version. The same function encrypts and descripts a string using a given key.
from xorCryptPy import xorCrypt
encrypted = xorCrypt('Hello World')
# Outputs: Ncjji&Qitjb
decrypted = xorCrypt(encrypted)
# Outputs: Hello World
# Use your own XOR Key.
encrypted = xorCrypt('Hello World', 9)
decrypted = xorCrypt(encrypted, 9)
(The default key is the same as the one from the JavaScript version!)
Licensed under the MIT license