Skip to content

Python package providing basic encryption/decryption using a handful of different ciphers

License

Notifications You must be signed in to change notification settings

hazzery/MessageCipher

Repository files navigation

MessageCipher

unittests passing codecov pre-commit.ci status Ruff linting: pylint Checked with mypy

MessageCipher is a hobby project I started whilst studying discrete mathematics in my first year at the University of Canterbury. It contains code that implements the Caesar Cipher and Affine Cipher algorithms, as well as a straight-forward implementation of an RSA crypto-system.

The primary purpose of displaying this project is to demonstrate my commitment to writing code that is easily understandable, well documented, and maintainable.

How to use

MessageCipher is intended to be used as a library, not as a standalone program. To use MessageCipher in your codebase, you need to install it using pip. This can be done one of two ways, either by directly cloning the git repository:

pip install message_cipher@git+https://github.com/hazzery/MessageCipher.git

Or by installing from a wheel (available for download from the releases page).

pip install /path/to/MessageCipher-1.3-py3-none-any.whl

Make sure to replace /path/to/MessageCipher-1.3-py3-none-any.whl with the correct path to the wheel you downloaded from GitHub.

Once installed, you can import from MessageCipher like so:

from message_cipher.rsa_system import RSA

public_key, private_key = RSA()
from message_cipher.rsa_encrypter import RsaEncrypter

product = ...
exponent = ...

encryption_key = RsaEncrypter(product, exponent)

Example Usage

The main.py file demonstrates very basic usage of this program. To execute this file in a terminal, run the following inside the project directory

python3 main.py

Running the tests

The unit tests can be run with the Python standard library module unittest

python3 -m unittest discover .

Licence

This project is licenced under version 3 of the GNU AGPL

AGPLv3

About

Python package providing basic encryption/decryption using a handful of different ciphers

Resources

License

Stars

Watchers

Forks

Languages