Skip to main content

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

  1. Input: A plaintext string.
  2. Convert to Bytes: The input string is converted to a byte sequence.
  3. Invert Bits: Each byte's bits are flipped (using the ~ operator).
  4. Base64 Encoding: The inverted bytes are encoded into a Base64 string for portability and security.
  5. Output: The resulting Base64 string.

Decryption

  1. Input: A Base64-encoded string.
  2. Decode from Base64: The string is decoded into its original inverted byte sequence.
  3. Restore Bits: The inverted bits are flipped back to their original state.
  4. Convert to String: The restored bytes are converted back into a plaintext string.
  5. Output: The original string.

Installation

Install the library via pip:

pip install bitcrypt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitcrypt-1.0.0.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitcrypt-1.0.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

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

Hashes for bitcrypt-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cf12659f6bfc96079fc7d8904082e00e95763f3a481b4a62a15ae065b8b9820d
MD5 3f1331764ab3f07a204c89e79b75fdb5
BLAKE2b-256 1d6c6f3cd82c7fdf80ef2786489d0e6fe03cf10c50311facf3cc07a1e5a63cac

See more details on using hashes here.

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

Hashes for bitcrypt-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c5803208b14bc4dc7a1d2be710b66d8e9ba859fd39ccc59a16a14ffed402537
MD5 638276c4d71a888d684441ea069a50a1
BLAKE2b-256 21366fd322c27121eef6bfe1c9765db9d25c80a88188b34b2dd1a321f470c8a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page