Skip to content

The 'BluffPadding Cipher Algorithm' : A Python-based encryption tool combining random prefixes/suffixes with character shifts for enhanced text obfuscation. Ideal for lightweight data security. 🛡️

Notifications You must be signed in to change notification settings

neuqs90/bluffpadding-cypher-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

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.

Example ScreenShot :

image

Contribution :

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

Author :

Name : Bhavya Padaliya

About

The 'BluffPadding Cipher Algorithm' : A Python-based encryption tool combining random prefixes/suffixes with character shifts for enhanced text obfuscation. Ideal for lightweight data security. 🛡️

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages