Skip to main content

Stegonography utilities

Project description

stegonosaurus

Ver 1.2.2

Steganography functions packed in a convenient wheel. This library helps encode and decode messages into and out of multi-band .png images. Works with the Image module of the Pillow library.

Requirements

  • Python3

Installing

A simple pip install will do:

pip install stegonosaurus

Functions

inspect:

Returns a string that contains the values of each pixel in the image along with other relevant info such as image size, format, file name, mode, and whether it can be used with the other functions in the library or not.

black:

Return an all black copy of a provided image. This helps create a template for images with coded messages used for encoding.

encode:

Takes two images, a black image with a message in contrasting colors, and the image where the message will be encoded. The image where the message is going to be hidden in is first "flattened" (all pixels with an odd value on their blue component are changed so their blue component's value is even). Afterwards, the image that contains the message is processed, so the same pixels that contain the bright red letters are changed in the other image to pixels where the blue value is odd (harder to express in theory than practice). The image with the bright message has to be smaller or equal in size to the image where the message is going to be hidden in on either axis.

decode:

Decodes an image with a hidden message. This functions looks for pixels where the blue value is odd, and paints those pixels bright red. This function operates on two modes:

-B,b (for "black"): pixels with an even blue value are colored black, displaying the message in red letters on a black background. -T,t (for "transparent"): pixels with an odd blue value are colored red, the other pixels remain the same so the message can be displayed on top of the original image.

Exceptions:

  • StegonosaurusIncorrectFormatError:

    Raised when a function receives a file that isn't a .PNG multiband image.

  • StegonosaurusIncorrectSizeError:

    Raised when the image with the coded message is larger than the image where the message will be hidden.

  • StegonosaurusInvalidDecodeModeError (Ver. 1.1.3):

    Raised when an invalid decode mode is provided.

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

stegonosaurus-1.2.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

stegonosaurus-1.2.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file stegonosaurus-1.2.2.tar.gz.

File metadata

  • Download URL: stegonosaurus-1.2.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for stegonosaurus-1.2.2.tar.gz
Algorithm Hash digest
SHA256 fb742009968e3fb45c03ae3c32267ddc98dbe33da82cfcb069a071a2ab537165
MD5 8d98da498bf8a154ec9d382ce6d0106e
BLAKE2b-256 e9e861bc3810fd167e54ea47a49738b3a7b43f3d94535b4fdca28543cbd26f27

See more details on using hashes here.

File details

Details for the file stegonosaurus-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for stegonosaurus-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 535a9a58003f69e7f2be30e93f2e50a2c64f0c3950d1ee8a9684c9fe4d7c22f7
MD5 d5cf67a656ac6d1be1d57874299808f5
BLAKE2b-256 c1fd5b59e8f1fca94ddd9fcae4b3680498cf9f14b6d8e12d28ffd5432b22f22f

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