Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.16 KB

README.md

File metadata and controls

39 lines (25 loc) · 1.16 KB

XOR-Crypt-Python

PyPI Version Python Versions License: MIT

A simple XOR string encryption library based on the JavaScript library XOR-Crypt by RobLoach but in Python.

Installation

pip install xorCryptPy

You can also download the package manually from PyPI.

Usage

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!)

License

Licensed under the MIT license