-
Python 3.10 or higher
-
Virtual Environment set-up
- Open a terminal in your project folder.
- Create a virtual environment (name it
venv):python -m venv venv
- Activate the virtual environment:
- Windows (Command Prompt):
venv\Scripts\activate
- Windows (PowerShell):
.\venv\Scripts\Activate.ps1
- Windows (Command Prompt):
- Install all required libraries:
pip install -r requirements.txt
-
Python Libraries
Note: Can also be installed throughpip -r install requirements.txt- python-dotenv
- pyscard
- pandas
- pycryptodome
- cryptography
- numpy
- pymongo
- gmpy2
- datetime
- psutil
- Ensure that all necessary packages are installed as mentioned previously, and that the program and its source codes are run in a virtual environment.
- Make sure to adjust the IP address for the
MongoDB_URIin thegui.pyanddb_manager.pysource codes. - Update the
.envfile to match the system path where patient_data_headers.csv is located. - Run the program by using the following command:
& .venv/Scripts/python.exe path/to/your/script.py - A GUI window will then appear, which allows the user to input the patient data and select an encryption algorithm, encrypt, and write to the NFC card, or decrypt the patient data written on the NFC card.
- The output for both encryption and decryption will be displayed in the GUI and will also be saved in both a CSV file (metrics_log) and a .log file (metrics_result.log), as seen in the images below. Additionally, another CSV file (e.g., decrypted_aes for AES decryption) containing the decrypted data is produced during each decryption, depending on the algorithm used.