Encryption over django CharField
Project description
Hyval
Hyval will store your information encrypted and decrypt it when needed :>
Usage:
instalation:
for install package :
pip install django-hyval
example :
1- in settings.py:
HIDE_MY_VALUE = {
'salt' : 'test',
'key': 'test',
'length' : 32,
'iteration': 1000,
}
2- in model:
from django.db import models
from hyval import HideMyValue
class TestHyval(models.Model):
name = models.CharField(max_length=50)
password = HideMyValue(max_length=32)
then:
action = TestHyval()
action.name = "test"
action.password = "test"
action.save()
Now your 'password' field on database stored with encryption so to retrieve value :
my_model = TestHyval.objects.get(pk=1)
my_model.password
>>> 'test'
mistake
there was mistake by me , so i deleted 'repository' and '.git' folder anciently, so there isn't any commit about past.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-hyval-1.0.1.tar.gz
(3.4 kB
view details)
File details
Details for the file django-hyval-1.0.1.tar.gz.
File metadata
- Download URL: django-hyval-1.0.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e4f0fa24174ba3dea2d3c96744befe2b8f205862dd53827aab62ab6e4f771b5
|
|
| MD5 |
278cd4f70e5b8a0caa35fe0a19879775
|
|
| BLAKE2b-256 |
a19ea8b3e6dd91dbd79dab3a291f2b42e518e355511426b98e3b9d027ecfe81b
|