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:
Piping from another program
All this commands should produce the same image as above.
> printf 'Hashpic rocks!' | md5 | python3 -m hashpic --bypass
> printf 'Hashpic rocks!' | python3 -m hashpic
Console Mode
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:
Examples
Bypassing a hash directly:
> python3 -m hashpic ff00ff00ff00ff0000ff00ff00ff00ffff00ff00ff00ff0000ff00ff00ff00ffff00ff00ff00ff0000ff00ff00ff00ffff00ff00ff00ff0000ff00ff00ff00ff --bypass --sha512
This command will produce the following image:
Disclaimer
The color palette in data.py
was copied from and influenced by the string-color
library.
Thanks for this!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.