identicon

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

README

identicon

This program implements a simple identicon library, similar to Github's.

There is a demo webservice included. Try:

go run demo/main.go

and then visit http://localhost:8080/dgryski.png

Documentation

Overview

Package identicon creates simple visual hashes of data as PNGs.

For more information, see https://en.wikipedia.org/wiki/Identicon and https://github.com/blog/1586-identicons

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer interface {
	// Render generates a PNG from data
	Render(data []byte) []byte
}

Renderer allows rendering of data as a PNG identicon

func New5x5

func New5x5(key []byte) Renderer

New5x5 creates a new 5-by-5 identicon renderer using 'key' as the hash salt

func New7x7

func New7x7(key []byte) Renderer

New7x7 creates a new 7-by-7 identicon renderer using 'key' as the hash salt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL