When dealing with sensitive user data like addresses, identification cards, and bank accounts, it's crucial not to store it directly in the database. Instead, encrypt the data before saving it. Proper management of encryption keys is paramount.
In this example, we'll illustrate the process of generating, storing, and utilizing encryption keys for securing sensitive user information.
Follow these steps to encrypt data of users using Locker:
-
Visit the Locker Secrets Manager and register for an account.
-
Log in and create a new project dedicated to your crypto wallet application.
-
Log in to your Locker account.
-
Navigate to the project created for your user data encryption application.
-
Click on "Access Keys" section.
-
Generate new access key with "Write" permission. Save your new access key.
- Install the Python SDK
- Creating a Virtual Environment
python3 -m venv projectenv
- Activating the Virtual Environment
On Linux/MacOS
source projectenv/bin/activate
On Windows
projectenv\Scripts\activate
- Install the Python SDK
pip install -r requirements.txt
- Integrate the SDK into your code by using examples