shredder_encryptor
A small, dependency-free playground for encoding and encryption in Python. The project bundles a handful of classical ciphers, an opinionated encoding toolbox, a tiny framework for wiring ciphers together and a small on-disk key store. Everything relies on the standard library only.
Status
Early-stage example code. The shipped ciphers (Vigenère, XOR-stream, Feistel block ciphers, SHA-256 wrapper) are intended for learning and experimentation; do not use them to protect real secrets.
Installation
pip install shredder-encryptor
Layout
shredder_encryptor/
codec/ # encoding helpers (text, hex, base64, padding, ...)
framework/ # BaseCipher, Pipeline, testing utilities
cipher/ # ready-to-use algorithms (Vigenère, XorStream, ...)
persistence.py # tiny on-disk key store
tests/ # pytest suite (codec, framework, cipher, persistence)
codec — encoders in one place
from shredder_encryptor import codec
codec.encode(b"hello") # standard base64
codec.encode_url(b"hello") # URL-safe base64
codec.pkcs7_pad(b"hi", 8) # PKCS#7 block padding
codec.token_urlsafe(32) # secrets.token_urlsafe wrapper
codec.hexdigest(b"hello", "sha1") # hashlib wrapper
framework — compose ciphers, test them
from shredder_encryptor.cipher import VigenereCipher, XorStreamCipher
from shredder_encryptor.framework import Pipeline, assert_round_trip
pipeline = Pipeline([VigenereCipher(b"alpha"), XorStreamCipher(b"beta")])
assert_round_trip(pipeline, b"pipeline payload")
cipher — concrete algorithms
from shredder_encryptor.cipher import (
VigenereCipher, XorStreamCipher, FeistelEcbCipher, FeistelCbcCipher,
Sha256Hash,
)
ct = FeistelCbcCipher(b"my-key").encrypt(b"hello world")
pt = FeistelCbcCipher(b"my-key").decrypt(ct)
persistence — small key store
from shredder_encryptor.persistence import save_key, load_key, list_keys
save_key("api-token", b"super-secret-bytes")
print(list_keys()) # ['api-token']
load_key("api-token") # b'super-secret-bytes'
Keys live in ~/.shredder_encryptor/keys/ by default with 0o600
permissions on POSIX and ACL-stripped equivalents on Windows.
Conventions
- Public APIs are typed and re-exported through each package's
__init__.py. Internal helpers start with an underscore. - Cipher classes inherit from
framework.BaseCipher; settingDECRYPTABLE = Falsemarks a one-way cipher. codecmirrors the style of well-known libraries (e.g.hashlib,secrets,base64) but keeps a single import root.
Security notice
The ciphers in shredder_encryptor.cipher are pedagogical.
FeistelEcbCipher / FeistelCbcCipher use a hand-rolled block
cipher with a tiny key size. VigenereCipher and XorStreamCipher
provide no authentication. For real-world cryptography, use a
vetted library such as cryptography.
License
MIT. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shredder_encryptor-2026.8.0.tar.gz.
File metadata
- Download URL: shredder_encryptor-2026.8.0.tar.gz
- Upload date:
- Size: 39.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d047cc50cc025a40559002be8a2ad236421e080950ee82f65cd4e4e4c81a178f
|
|
| MD5 |
f12727a645868029dc7cd9ca240f27a7
|
|
| BLAKE2b-256 |
71616dabe699837f96fd803736dfd5c2708e4b82266be3ab7bcc4e4006b8a716
|
File details
Details for the file shredder_encryptor-2026.8.0-py3-none-any.whl.
File metadata
- Download URL: shredder_encryptor-2026.8.0-py3-none-any.whl
- Upload date:
- Size: 40.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1696356fa5232ea83bb865b5af3013d35b0e33746025a13b424a3e1afe61fdc3
|
|
| MD5 |
706d4380d8852a57e796d0b1f6e872c2
|
|
| BLAKE2b-256 |
ce5e52783dadc6c7b404ee7397605cab1f28d1a44cdc55a6cdd3132aa5c38a9e
|