Table des matières

VizHash GD - a visual hash

What is a visual hash ?

MD5 and SHA1 are common hashing function, which produce a binary or hex string. A visual hash works the same, but produces an image.

Like MD5 or SHA1:

What is VizHash GD ?

VisHash GD is an implementation of a visual hash in php. It is free software, under the zlib/libpng OSI licence.

Features:

Examples

The vizhash of the string “hi” in different sizes:

16×16:
80×80:
128×128:
256×256:
32×32:
Stretched vertically:
32×128:
Stretched horizontally:
128×32:

A few domain names hashed:

facebook.com
mozilla.com
twitter.com
commentcamarche.net
google.fr
siteduzero.com
slashdot.org
sourceforge.net

(Yes, I know it's ugly. But beauty is not the point.)

Licence

Vizhash_GD is under the zlib/libpng OSI licence.

Source

Current version is 0.0.4 beta. It's only play-test code and could probably be improved, but it works.

An online service is available for you to test: http://sebsauvage.net/vizhash_gd.php - PLEASE DO NOT HAMMER THIS SERVICE or I will have to take it down. Do not hotlink images to this URL: Install the script on your own server. Thank you.

Applications

Many applications can be envisioned:

Java implementation

Edouard de Labareyre has developed a Java version of Vizhash GD which is visually compatible with the php version (This means that the generated images are the same between the Java and php version for the same input).

Javascript implementation

Sam & Max has implemented a visual hash in javascript which uses HTML5 canvas. It is visually close (but not identical) to the php and java version. VizHash.js is under the zlib/libpng licence.

Other visual hashes: