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 details)
Built Distribution
File details
Details for the file srndcipher-0.6.2.tar.gz
.
File metadata
- Download URL: srndcipher-0.6.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06f13ff157fc7a30385c936c1eec098a904d36a21b5fe92687e439a803d36c4d |
|
MD5 | fc0848c53aad227ce6fc6cb83c285412 |
|
BLAKE2b-256 | 61ce7a12ae6cb26f7866d299f4a29fffe58221affc59f7fbc5b3ca88ada3faf5 |
File details
Details for the file srndcipher-0.6.2-py3-none-any.whl
.
File metadata
- Download URL: srndcipher-0.6.2-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aea4159efafc5df24fd3d75ea3a813303ff91685c1e70be6796046c75580f88b |
|
MD5 | 7673003e9bd939450aa961bf6ba8f059 |
|
BLAKE2b-256 | 8ed48fa7930fc876e7dde0f3c6498af3cb5fe1e81ce6b07f4fe0ed7aa1e9b75d |