🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

bluffpaddingcypher

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bluffpaddingcypher

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

1.0
PyPI
Maintainers
1

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 :

  • 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.
  • 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

Keywords

encryption

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts