Skip to main content

Embed and retrieve hidden data using pixelated color codes in PNG files.

Project description

DCEN - Data Concealment and Extraction via Numerical encoding

Description

DCEN is a utility that enables encoding and decoding of data arrays by creating image files containing graphical information without data loss due to compression. DCEN uses ASCII padding, so make sure you use only ASCII symbols. (No cyrylica)

Features

  • Encoding text messages into PNG images using grayscale color gradations.
  • Decoding text messages from PNG images, restoring the original text.
  • Does not require external data or keys; encoding and decoding are based on grayscale values in the image.

Installation

To install the dcen package, use pip:

pip install dcen

Usage

Encoding a Message

To encode a message into a PNG image, use the encode function:

import dcen

# Encoding a message into an image
message = "Hello, World!"
dcen.encode(message, "encoded_image.png")

Decoding a Message

To decode a message from a PNG image, use the decode function:

import dcen

# Decoding a message from an image
decoded_message = dcen.decode("encoded_image.png")
print(decoded_message)

Functions

dcen.encode(text: str, filename: str)

⬆ Encodes the given text into a PNG image and saves it as filename.

  • Parameters:

    • text (str): Message to be encoded.
    • filename (str): Name of the file where the PNG image will be saved.
  • Returns:

    • Encoded data as a PNG image.

dcen.decode(filename: str) -> str

⬆ Decodes the message from a PNG image file.

  • Parameters:

    • filename (str): Name of the file from which the message will be decoded.
  • Returns:

    • Decoded message as a string.

Requirements

  • Python 3.6 or higher
  • Pillow (Python Imaging Library)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

dcen-0.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

dcen-0.1-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

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