Package: blockit
BlockItBlockIt is a Python package that provides various encryption algorithms and a CLI application for easy encryption and decryption of text. It implements the ShiftEncryption, ReverseEncryption, and MatrixEncryption algorithms and allows dynamic selection of encryption algorithms using Abstract Factory design pattern.DeliverablesImplemented the following encryption algorithms: ShiftEncryption, ReverseEncryption, MatrixEncryptionAdd the--shiftoption to specify the number of shifts to be performed instead of being fixed at 3Dockerized the project, enabling easy testing of the application in a containerized environment using docker-composeUtilized the Abstract Factory Design Pattern, enabling dynamic creation of encryption algorithmsDeveloped a CLI application usingTyper, facilitating easy text encryption and decryptionDistributed and published the package on PyPI athttps://pypi.org/project/blockit/Reimplemented the Reverse Encryption Algorithm and deployed it on Vercel as a FastAPI application. This was necessary due to the previously provided endpoints experiencing timeouts and functionality issues.Published a Postman collection for the API endpoints, available athttps://documenter.getpostman.com/view/8975155/2s93zB528TUtilized semantic commit messages to effectively track the project's progressWrote comprehensive unit tests for all encryption algorithms: ShiftEncryption, ReverseEncryption, MatrixEncryptionUtilizedpytestandpytest-covto run tests and generate coverage reportsIncorporatedpre-commithooks to ensure consistent formatting, type checking, and linting before each commitAutomated formatting and versioning of the package using aMakefileDocumentation including installation instructions, usage guidelines, known issues, testing instructions, and research details.A well-documented codebase, providing clear documentation for each function and classInstallationInside a Docker ContainerRundocker-compose up --buildto build the image and run the containerRundocker-compose exec web bashto enter the containerTheblockitCLI is now available inside the containerPublished CLIInstall the package usingpip install blockitRunblockit --helpto see the available commands and optionsUsage:blockit[OPTIONS]TEXTALGORITHMMETHOD╭─Arguments───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│*textTEXTTexttobeencrypted/decrypted[default:None][required]│
│*algorithmTEXTEncryptionalgorithmtobeused[default:None][required]│
│*methodTEXTMethodtobeused:'Encrypt'or'Decrypt'[default:None][required]│
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ManuallyClone the repository,git clone https://github.com/0xsirsaif/blockit, andcdinto itCreate a virtual environment,python -m venv venv, and activate it,source venv/bin/activateInstall the dependencies,pip install -r requirements.txtRunpython -m blockit --helpto see the available commands and optionsUsageShiftEncryptiondefault shift value is 3, but can be changed using the--shiftoption$blockit"Hello World"shiftEncrypt
KhoorZruog$blockit"Khoor Zruog"shiftDecrypt
HelloWorldReverseEncryption$blockit"Hello World"reverseEncrypt
dlroWolleH$blockit"dlroW olleH"reverseDecrypt
HelloWorldMatrixEncryption$blockit"Hello World"matrixEncrypt$blockit"Hello World"matrixDecryptTestingTests are grouped into three Test Classes: TestShiftEncryption, TestReverseEncryption, and TestMatrixEncryption.To run all tests, run the following command:$python-mpytest--covtests/-vvsTo run a specific test with keyword, run the following command:$python-mpytest--covtests/-vvs-k<keyword>Known IssuesPlease be aware that there is currently a bug in theMatrixEncryptionalgorithm. I have been unable to fix it in time for the deadline, but I will continue working on it and will push the fix as soon as possible. I've added a test case for the bug as well.LicenseMIT License