Nti Johanneberg gymnasiearbete 2023/2024
Py Encry is a library for encrypting and decrypting information in pictures. The library offers a variety of different encryption methods, and also allows to combine them. There is an API mode, which allows to use the library in other projects, and a CLI mode, which allows to use the library from the command line. Additionally, the tool is accesable through our website.
To install Py Encry, you need to have Python 3.12 or newer installed on your computer. The library is available on PyPI, so you can install it using pip.
python -m pip install py-encry
To use Py Encry, you can either use the API or the CLI. If the program is intended to be used in another project, the API is the way to go, the CLI is intended for quick usage from the command line.
To use the CLI, you need to install the package and then run the pyencry
command.
Note! The python package install folder may not be in your PATH, so you may need to add it manually.
Just google your operating system and how to add the python executable folder to your PATH.
Once the package is installed, you can run the pyencry
command.
You can use the --help
flag to get more information about all the available options.
pyencry -v
1.0.0b1
pyencry --help
...
To use the API, you need to import the py_encry
module.
from pyencry import ImageHandler
handler = ImageHandler("<path_to_image>")
handler.encrypt("<encryption_method>", data="<data_to_encrypt>", key=<encryption_key>)
handler.save("<path_to_save_image>")
For full documentation, visit our website or check out the docstrings in the code.
If you want to contribute to Py Encry, you can do so by forking the repository and creating a pull request. To build the project, you need to have Python 3.12 or newer installed on your computer and install the required packages.
Use the package manager pip to install the required packages.
python -m pip install -r requirements.txt
python -m pytest