SQL Archery 代码说明及优化(一)
1.字段加密–django-mirage-field
一个django模型字段,在保存到数据库时对数据进行加密,在从数据库获取数据时进行解密。它使数据库中的数据始终加密。
A Django model fields collection that encrypt your data when save to and decrypt when get from database. It keeps data always encrypted in database. Base on AES, it supports query method like get()
and filter()
in Django.
Mirage can also migrate data from origin column to encrypted column in database with a good performance.
需要导入的模块为;
from mirage.crypto import Crypto