Coder Social home page Coder Social logo

vizhash's Introduction

VizHash GD

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

  • 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 discussions (example).

  • 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 ?

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.

Other implementations

There are implementation of VizHash in other languages:

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.

vizhash's People

Contributors

sebsauvage avatar inouire avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.