A simple way to encode plain text, keeps the result sortable and partly searchable.
Project description
srndcipher
A simple way to encode plain text, keeps the result sortable and partly searchable.
Install
pip install srndcipher
Usage
import os
import srndcipher
cipher1 = srndcipher.SrndCipher(password="Your password")
data1 = os.urandom(1024)
data2 = cipher1.encrypt(data1)
data3 = cipher1.decrypt(data2)
assert data1 == data3
cipher2 = srndcipher.SrndCipher(password="Your password", force_text=True)
data1 = "your plain message"
data2 = cipher2.encrypt(data1)
data3 = cipher2.decrypt(data2)
assert data1 == data3
Notice
- SrndCipher instance init takes about 0.6 second time, so try to keep the instance reusable.
Releases
v0.5.0
- First relase.
v0.6.2
- Set SrndCipher.default_result_encoder to cipherutils.Utf8Encoder().
- Works with fastutils>=0.42.11.
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
srndcipher-0.6.2.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for srndcipher-0.6.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aea4159efafc5df24fd3d75ea3a813303ff91685c1e70be6796046c75580f88b |
|
MD5 | 7673003e9bd939450aa961bf6ba8f059 |
|
BLAKE2b-256 | 8ed48fa7930fc876e7dde0f3c6498af3cb5fe1e81ce6b07f4fe0ed7aa1e9b75d |