Пример #1
0
// New7x7 creates a new 7-by-7 identicon renderer using 'key' as the hash salt
func New7x7(key []byte) Renderer {
	return &identicon{
		sqSize: 50,
		rows:   7,
		cols:   7,
		h:      siphash.New(key),
	}
}
Пример #2
0
// New5x5 creates a new 5-by-5 identicon renderer using 'key' as the hash salt
func New5x5(key []byte) Renderer {
	return &identicon{
		sqSize: 70,
		rows:   5,
		cols:   5,
		h:      siphash.New(key),
	}
}