A Python encryption library.
Project description
Xcrypt
A lightweight encryption and decryption library for Python.
How to use
Run pip install xcrypt
to add xcrypt to your python libraries. After that you
need you import it using import xcrypt
, but you probably knew that already.
Once you have it imported you can start using xcrypt. First, you need a working
key file. You can get this by using the xcrypt.make_key()
script. Now that you
have that you will need to use that key to encrypt something, like so:
xcrypt.encode(<key path>,<message>)
in this case that would be
xcrypt.encode('./my_xcrypt.key','Hello World!')
. This will return the encrypted
text as a string, its roughly the same for the decrypt function.
Here is an example for generating a key, encrypting data using the key and
decrypting the encrypted data, of course using the key.
# Import xcrypt file [xcrypt.py]
import xcrypt
# Define the message to encrypt and decrypt.
message = input("Message: ")
# Build the key and return key file name.
key = xcrypt.make_key()
# Encrypt message and display it on screen.
encrypted = xcrypt.encode(key, message)
print("\nEncrypted:" + encrypted)
# Decrypt message and display it on screen.
decrypted = xcrypt.decode(key, encrypted)
print("\nDecrypted:" + decrypted)
# Input to prevent exit right away upon run.
input("")
Dealing with issues
Make sure your using a python version compatible with xcrypt. (3.6+)
Check to make sure the key file isn't broken or missing, also,
make sure your using the same key file for encryption and decryption.
If your going to make a GitHub issue or report an issue in my discord server
please make sure to include the following information.
- Python version your using
- XCrypt version your using
- PIP version your using
- Any XCrypt modifications you did
- Key file your using or a different key file you generated
- Code your using (optional)
XCrypt is copyright of kgsensei, 2021.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file xcrypt-1.1.0.tar.gz
.
File metadata
- Download URL: xcrypt-1.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba0b825c06b1c9ad9401f2b302c7c74e332303d0627976a65cd367bb593db7ef |
|
MD5 | a3f65897f4556ea0fff72cc20ccf7b59 |
|
BLAKE2b-256 | 76cc7585e209a76554acce9b3377b07fc142deed083b42c2a1a283597a99bcab |
File details
Details for the file xcrypt-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: xcrypt-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dfc8d0e0af9a83db69e4c7c55259b99e884c300e22bb4a6ebdcff383004b555 |
|
MD5 | d752010e793735b4627553ce4fd75a73 |
|
BLAKE2b-256 | 51b963938133576dd1673f42a97f71c18c3cdf813a5cecd8625f2d7b1b6bda8c |