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
Metadata
Release files for bitcrypt 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bitcrypt-1.0.0.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bitcrypt-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.3 kB
Release files / bitcrypt-1.0.0.tar.gz
| Download URL | bitcrypt-1.0.0.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf12659f6bfc96079fc7d8904082e00e95763f3a481b4a62a15ae065b8b9820d
|
|
BLAKE2b-256 checksum How to use checksums |
1d6c6f3cd82c7fdf80ef2786489d0e6fe03cf10c50311facf3cc07a1e5a63cac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / bitcrypt-1.0.0-py3-none-any.whl
| Download URL | bitcrypt-1.0.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c5803208b14bc4dc7a1d2be710b66d8e9ba859fd39ccc59a16a14ffed402537
|
|
BLAKE2b-256 checksum How to use checksums |
21366fd322c27121eef6bfe1c9765db9d25c80a88188b34b2dd1a321f470c8a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|