Skip to main content

Create an image from a MD5 or SHA512 hash

Project description

Hashpic

Hashpic creates an image from the MD5 hash of your input.

Since v0.2.0 it is also possible to create an image from a SHA-512 hash.

Since v0.2.3 it is also possible to create an image from a SHAKE-256 hash with variable digest length of 16 or 64.

Install

pip3 install hashpic

Usage

> python3 -m hashpic 'Hashpic rocks!'

This should create a file output.png in your current directory. The input Hashpic rocks! should create the following image:

hashpic image

Piping from another program

All this commands should produce the same image as above.

> printf 'Hashpic rocks!' | md5 | python3 -m hashpic --md5

> printf 'Hashpic rocks!' | python3 -m hashpic

Console Mode

console

SHA-512 Mode

It is also possible to create an image from a SHA-512 hash. All arguments for MD5 Mode are also available for SHA512 Mode.

> python3 -m hashpic --sha512 'Hashpic rocks!'

> printf 'Hashpic rocks!' | python3 -m hashpic --sha512

This commands should create the following image:

sha512 image

Disclaimer

The color palette in data.py was copied and influenced from the string-color library. Thanks for this!

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

hashpic-0.2.3.tar.gz (11.2 kB view hashes)

Uploaded Source

Built Distributions

hashpic-0.2.3-py3.9.egg (26.8 kB view hashes)

Uploaded Source

hashpic-0.2.3-py3-none-any.whl (13.5 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