Skip to main content

BluffPadding Cipher Algorithm: A Python-based encryption tool combining random prefixes/suffixes with character shifts for enhanced text obfuscation.

Project description

BluffPadding Cipher Algorithm

🔒 BluffPadding Cipher Algorithm is a Python-based encryption tool that combines random prefixes and suffixes with character shifts to provide enhanced text obfuscation. Ideal for lightweight data security. 🛡️

Features

  • Generates random prefixes and suffixes for added security
  • Shifts characters by a random value for encoding
  • Simple encryption and decryption functions

Installation

You can install the bluffpadding-cypher-algorithm package from PyPI using pip:

pip install bluffpaddingcypher

Usage

Here is how you can use the bluffpaddingcypher package to encrypt and decrypt text:

  • Encrypting Text :

    from bluffpaddingcypher.cypher import encrypt
    
    text = "Hello, World!"
    encrypted_text = encrypt(text)
    print("Encrypted:", encrypted_text)
    
  • Decrypting Text :

    from bluffpaddingcypher.cypher import decrypt
    
    encrypted_text = """MI{~rCb6o'PS\ZfRovvy6*ay|vn+)S'h,3YvNs*=]yz,c{]SWeC5^.:syM|Xt}^$I(G9%W:NL]b?VTLZ+-OY3_$},Lf?*p<=L5F0T6S~'Bkhv82S"""  # Use the output from the encryption step
    decrypted_text = decrypt(encrypted_text)
    print("Decrypted:", decrypted_text)
    
  • Example :

    from bluffpaddingcypher.cypher import encrypt, decrypt
    
    # Original text
    text = "Hello, World!"
    
    # Encrypt the text
    encrypted_text = encrypt(text)
    print("Encrypted Text:", encrypted_text)
    
    # Decrypt the text
    decrypted_text = decrypt(encrypted_text)
    print("Decrypted Text:", decrypted_text)
    
  • Expected Output :

    Encrypted: =Hzw@<UXf!x{9Rovvy6*ay|vn+VJx!RIG@XGZ)'af&>pbG8/O|q6B$YxP"\nP*fbI)/xUd$pf!do2
    
    Decrypted: Hello, World!
    

How It Works :

  1. Encrypt Function

    • Generates a random prefix and suffix of random lengths (between 2 and 100 characters).
    • Shifts each character in the input text by a random value (between 1 and 10).
    • Combines the prefix, shifted text, suffix, and the shift value into the final encoded text.
  2. Decrypt Function

    • Extracts the prefix length and removes the prefix.
    • Extracts the suffix length and removes the suffix.
    • Extracts the shift value.
    • Reverses the character shift to retrieve the original text.

Contribution :

Contributions are welcome! Please open an issue or submit a pull request on GitHub Repository.

Author :

Name : Bhavya Padaliya

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

bluffpaddingcypher-1.0.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file bluffpaddingcypher-1.0.tar.gz.

File metadata

  • Download URL: bluffpaddingcypher-1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.1

File hashes

Hashes for bluffpaddingcypher-1.0.tar.gz
Algorithm Hash digest
SHA256 1ef2fd58e9e3e974c41d0ca4fb1ccc9e90fd3956b4c985cfea4497f6166a0417
MD5 809947c5505a566eb7fddee1d9159d52
BLAKE2b-256 a78136f4d1c8799227464d0859099163ed13c845686eb2d2d2fe4368d7a2d958

See more details on using hashes here.

Supported by

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