Secures Personally Identifiable Information using AES (128/256 bit) key encryption.
Project description
Overview
The pii_crypt was written to help secure sensitive information.
Installation
To download pii_crypt, either fork this github repo or simply use Pypi via pip.
$ pip install pii-crypt
Usage
from pii_crypt import PIICrypt
secret_128bit_key = '1234567812345678'
pc = PIICrypt(secret_128bit_key)
# Encrypt/Decrypt
encrypted = pc.encrypt('John Doe')
print(encrypted) # VQd0JvSY8PTsszHEURT8xw==
decrypted = pc.decrypt(encrypted)
print(decrypted) # John Doe
Unit Tests
✘ jay@ThinkPad ~/pii_crypt master ± coverage run --source=. -m unittest
....
----------------------------------------------------------------------
Ran 4 tests in 0.002s
OK
Code Coverage
✘ jay@ThinkPad ~/pii_crypt master ± coverage report --omit=setup.py
Name Stmts Miss Cover
--------------------------------------------
pii_crypt/__init__.py 1 0 100%
pii_crypt/pii_crypt.py 19 0 100%
--------------------------------------------
TOTAL 20 0 100%
License
MIT License
Copyright (c) 2021
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pii_crypt-1.0.6.tar.gz
.
File metadata
- Download URL: pii_crypt-1.0.6.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.11.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a392da82f33f71073c23fa5fe49ae1eb7e772845e43c25fdfe7081a8396daeb |
|
MD5 | fc0870c73e49d84371af825b0a09ea57 |
|
BLAKE2b-256 | 7d04a1755e96003e9c3d9ef1d7869cd1d5d9b7b0d991c7c2593ba976171b75f8 |