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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file dcen-0.1.tar.gz.

File metadata

  • Download URL: dcen-0.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for dcen-0.1.tar.gz
Algorithm Hash digest
SHA256 7c7304d07c227d9cde44b66e9e2f683bea1a73153619cc19cfe10a9d03218144
MD5 dd1401a86166372b9548c202c4911312
BLAKE2b-256 9cda5e650a9b641adefc85070320352d1315e6e8b872ac1d50b892a895681cda

See more details on using hashes here.

File details

Details for the file dcen-0.1-py3-none-any.whl.

File metadata

  • Download URL: dcen-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for dcen-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1fffc2f6a95f95a53da15201696ddc91d4491083e0129db01d556f00bf21deb2
MD5 aecfd24fce16e553964f949abb31d2c0
BLAKE2b-256 6ee6adadc1ab66edc3b9aacee64c1a6daf2b392f51c5d146f9644c8856ee6b5b

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