PHPackages                             sebsauvage/vizhash - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sebsauvage/vizhash

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sebsauvage/vizhash
==================

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

07PHP

Since Mar 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Facyla/VizHash)[ Packagist](https://packagist.org/packages/sebsauvage/vizhash)[ RSS](/packages/sebsauvage-vizhash/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

VizHash GD
==========

[](#vizhash-gd)

What is 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:

- It takes an arbitrary, variable-size input.
- It's a one-way function.
- The image is unique to the input string (it's a fingerprint)
- A single bit of difference in the input string produces a totally different image.
- It's not possible to deduce the input string from the image.

Applications
============

[](#applications)

- *File comparison*: If you need to compare files or commit hashes, comparing visual hashes is instant (much easier than comparing md5 or sha1).
- *Avatars*: VizHash can be used as an avatar in forums or blog comments. Simply hash the IP (or email) address and feed into VizHash and ou have a unique icon for each visitor, specific to its IP or email address. VizHash is used is [ZeroBin](https://github.com/sebsauvage/ZeroBin) discussions ([example](http://sebsauvage.net/paste/?b3d94022c526d402#T0faEej4u5xubp7d2+n9Xg1tIogj5McY99zP8D0120U)).
- *Protection against TabJacking*: VizHash could be used - for example - as a persona in Firefox to give a visual hint of the real domain the user is currently on.
- *Password check* : Make sure you typed the right password without displaying it on screen (à la Lotus Notes).

What is VizHash GD ?
====================

[](#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:

- Can produce images up to 256×256.
- Visual hashes keep their visual features even if scaled (see examples below)
- Uses only php and basic GD (which are available almost everywhere). Does not use imagefilter GD functions (which are not available everywhere).
- Runs under php4 and php5.
- VizHash GD is not beautiful (no fractals, wavelets or high-end filters). It's designed to be fast, light on CPU and to produce images which are easy to differentiate.

You can [test it online](http://sebsauvage.net/vizhash_gd.php).

Other implementations
=====================

[](#other-implementations)

There are implementation of VizHash in other languages:

- Javascript version (by Sam &amp; Max):  ([demo](http://jsfiddle.net/2nYsg/3/embedded/result/))
- jQuery password plugin (by Sam &amp; Max):  ([demo](http://jsfiddle.net/TANLB/light/))
- Java (by inouire):

Note that these visual hashes are *close* to the php implementation, but may have some differences.

---

VizHash GD is under the zlib/libpng licence:

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

```
1. The origin of this software must not be misrepresented; you must
   not claim that you wrote the original software. If you use this
   software in a product, an acknowledgment in the product documentation
   would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must
   not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source distribution.

```

---

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/286492?v=4)[Florian DANIEL aka Facyla](/maintainers/Facyla)[@Facyla](https://github.com/Facyla)

---

Top Contributors

[![Facyla](https://avatars.githubusercontent.com/u/286492?v=4)](https://github.com/Facyla "Facyla (2 commits)")[![sebsauvage](https://avatars.githubusercontent.com/u/1647758?v=4)](https://github.com/sebsauvage "sebsauvage (2 commits)")[![inouire](https://avatars.githubusercontent.com/u/404520?v=4)](https://github.com/inouire "inouire (1 commits)")

### Embed Badge

![Health badge](/badges/sebsauvage-vizhash/health.svg)

```
[![Health](https://phpackages.com/badges/sebsauvage-vizhash/health.svg)](https://phpackages.com/packages/sebsauvage-vizhash)
```

###  Alternatives

[kartik-v/yii2-widget-depdrop

Widget that enables setting up dependent dropdowns with nested dependencies (sub repo split from yii2-widgets)

815.1M18](/packages/kartik-v-yii2-widget-depdrop)[mguinea/laravel-robots

Laravel package to manage robots in an easy way

1562.4k](/packages/mguinea-laravel-robots)[glhd/hooks

1729.7k](/packages/glhd-hooks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
