A library for bit-level encryption and decryption with Base64 encoding.
Project description
BitCrypt
BitCrypt is a Python library for encrypting and decrypting text strings at the bit level, with additional Base64 encoding for secure storage or transmission.
Features
- Encrypt strings by inverting their bits and encoding them with Base64.
- Decrypt Base64-encoded strings back to their original form by restoring the inverted bits.
- Simple API for integration into other projects.
- CLI support for quick encryption and decryption.
How It Works
The library performs encryption and decryption through the following steps:
Encryption
- Input: A plaintext string.
- Convert to Bytes: The input string is converted to a byte sequence.
- Invert Bits: Each byte's bits are flipped (using the
~operator). - Base64 Encoding: The inverted bytes are encoded into a Base64 string for portability and security.
- Output: The resulting Base64 string.
Decryption
- Input: A Base64-encoded string.
- Decode from Base64: The string is decoded into its original inverted byte sequence.
- Restore Bits: The inverted bits are flipped back to their original state.
- Convert to String: The restored bytes are converted back into a plaintext string.
- Output: The original string.
Installation
Install the library via pip:
pip install bitcrypt
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
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 bitcrypt-1.0.0.tar.gz.
File metadata
- Download URL: bitcrypt-1.0.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf12659f6bfc96079fc7d8904082e00e95763f3a481b4a62a15ae065b8b9820d
|
|
| MD5 |
3f1331764ab3f07a204c89e79b75fdb5
|
|
| BLAKE2b-256 |
1d6c6f3cd82c7fdf80ef2786489d0e6fe03cf10c50311facf3cc07a1e5a63cac
|
File details
Details for the file bitcrypt-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bitcrypt-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c5803208b14bc4dc7a1d2be710b66d8e9ba859fd39ccc59a16a14ffed402537
|
|
| MD5 |
638276c4d71a888d684441ea069a50a1
|
|
| BLAKE2b-256 |
21366fd322c27121eef6bfe1c9765db9d25c80a88188b34b2dd1a321f470c8a8
|