DEV Community

Cover image for Encrypt your crucial data into Image file
Siddhartha Roy
Siddhartha Roy

Posted on

3 1

Encrypt your crucial data into Image file

PiEncrypt

Pie Test
DevSkim
PyPI - Python Version

Encrypt your crucial data into Image file.

pip install piencrypt

latest release 0.7.5.6

Minimal app

from piencrypt import pie

r = pie.PiEncrypt('pic.png')
r.get_data()

r.hide_data("Hello my name is Sid")

read = r.read_data()

r.revert()
print(read)
Enter fullscreen mode Exit fullscreen mode

Initialize and create a backup of the picture as bytes

    r = pie.PiEncrypt('pic.png')

    r.get_data()
Enter fullscreen mode Exit fullscreen mode

pic.jpg should be replaced by your picture name present in the root directory

Hide the disired data into the picture

    r.hide_data("Hello my name is Sid")
Enter fullscreen mode Exit fullscreen mode

Read the hidden data from the picture

   read = r.read_data()

   print(read)
Enter fullscreen mode Exit fullscreen mode

Revert the picture from the backup file

    r.revert()
Enter fullscreen mode Exit fullscreen mode

https://pypi.org/project/piencrypt/

Repeat !

@copyright Throttlerz INC 2021

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (1)

Collapse
 
sid86dev profile image
Siddhartha Roy

Check the repo here

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs