Riddle
Riddle is a Python library for encryption.
Installation
pip install riddle
Usage
Riddle
from riddle import Riddle
riddle = Riddle(key=1245)
encrypted = riddle.encrypt(obj=['Hello World!', 123])
print('Encrypted:\n\n', encrypted, '\n\n')
decrypted = riddle.decrypt(encrypted)
print('Decrypted:\n\n', decrypted)
produces:
Encrypted:
wpLCr8OCfFjDjcKowqnDqcOFbcKYwrXDmcOXeMK6woZuwpVbw47DpMKiQ8OHwpnCr8Khw5XDpcKVw43Dm8Kdwr_Cq3N5wrrCokDCpsKJwpt1woXCmFjDmMOFwo7Cp8KIwoHCgcKNwprCocKhf8KKwpdobMKSwqTCpG_CosKGVMKWwpc=
Decrypted:
['Hello World!', 123]
SecretKeeper
from riddle import SecretKeeper
from pandas import DataFrame
data = DataFrame({
'name': ['John', 'Jack', 'Joe'],
'age': [12, 13, 14],
'random': [[1,2,3], [1,2,3], [1]]
})
data['age_divided_by_ten'] = data['age'] / 10
keeper = SecretKeeper()
anonymized_data = keeper.anonymize(data=data)
identified_data = keeper.identify(data=anonymized_data)
data.equals(identified_data) # returns True
Release files for riddle 2020.7.26
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| riddle-2020.7.26.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| riddle-2020.7.26-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / riddle-2020.7.26.tar.gz
| Download URL | riddle-2020.7.26.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
968e99ec6094c4cc8497bcafda6243ebfa5cddbad93db2b5df03e6da1256ce5c
|
|
BLAKE2b-256 checksum How to use checksums |
044d7d6bbda3df4a28572c73d9e890f220398d5cdb8e365ddcdd64f37f1b917d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.2
|
Release files / riddle-2020.7.26-py3-none-any.whl
| Download URL | riddle-2020.7.26-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32680a535dee7fb270ff82920269bc9c6d187a773c2585cb99183b5e0d423f8c
|
|
BLAKE2b-256 checksum How to use checksums |
3d311dc33b5c239a26e5d7aafd400cd2541611c1effe1e445f67d64f103577a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.2
|