Python library for encryption
Project description
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
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
riddle-2020.3.23.1.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for riddle-2020.3.23.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9887262e97d65fe00ccab6c4d26a49b2f828173ba86abf9236ff48e3ad20430d |
|
MD5 | bd5c67423f2c7b6865c386c417885070 |
|
BLAKE2b-256 | b2e1aea62ff6d40a137d7e4016f8e8a6853c4a0fa7bccea3eef0e70cbb2dd69d |