Skip to main content

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

xcrypt-1.0.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

xcrypt-1.0.0-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file xcrypt-1.0.0.tar.gz.

File metadata

  • Download URL: xcrypt-1.0.0.tar.gz
  • Upload date:
  • Size: 2.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

Hashes for xcrypt-1.0.0.tar.gz
Algorithm Hash digest
SHA256 43c6e5f109d62938f8f5ef7e3c16506acc35182493f29c668ca17942c2e1daad
MD5 9dfb07782559fa4c632c890ef2cfac65
BLAKE2b-256 fb31d66639b990df12f282e1cdb585c7009eb73d4816c0cad155ddec301c5036

See more details on using hashes here.

File details

Details for the file xcrypt-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: xcrypt-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.1 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

Hashes for xcrypt-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52b96829299cc141bcef269b383a43fe56f76b0d0cd73e46cdff85191a1d68ef
MD5 b6b9fb6565905b5b52dc62edb49cc566
BLAKE2b-256 6d1fda6d9b94cc63adff88fe4f6927995a2583c63eb7c8438b35e487d71ed66f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page