2021-10-08 16:42:25 +02:00
|
|
|
========
|
|
|
|
|
Overview
|
|
|
|
|
========
|
|
|
|
|
|
|
|
|
|
Protect yourself and your customers with database encryption.
|
|
|
|
|
|
|
|
|
|
* Free software: MIT license
|
|
|
|
|
|
|
|
|
|
Installation
|
|
|
|
|
============
|
|
|
|
|
|
|
|
|
|
pip install cryptbase
|
|
|
|
|
|
|
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
Usage
|
|
|
|
|
============
|
2021-10-08 16:42:25 +02:00
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
You can use cryptbase with django ORM or witg SQLAlchemy.
|
2021-10-08 16:42:25 +02:00
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
To use with SQLAlchemy:
|
2021-10-08 16:42:25 +02:00
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
from cryptbase import EncryptedText
|
|
|
|
|
sensitive = Column(EncryptedText(key=DB_KEY))
|
2021-10-08 16:42:25 +02:00
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
To use with django:
|
2021-10-08 16:42:25 +02:00
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
from cryptbase import EncryptedTextField
|
|
|
|
|
sensitive = EncryptedTextField(key=DB_KEY)
|
2021-10-08 16:42:25 +02:00
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
DB_KEY is 32 bytes encryption key as hex encoded string. Fields behave as TEXT fields, data are transparently encrypted
|
|
|
|
|
when storing into the database and decrypted on retrieval.
|
2021-10-08 16:42:25 +02:00
|
|
|
|
|
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
Development
|
|
|
|
|
===========
|
2021-10-08 16:42:25 +02:00
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
To run all the tests run::
|
2021-10-08 16:42:25 +02:00
|
|
|
|
2021-10-17 21:09:34 +02:00
|
|
|
tox
|