randomart

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2017 License: MIT Imports: 1 Imported by: 5

README

randomart Build Status

Generate OpenSSH style "randomart" images based on key fingerprints.

Documentation

http://godoc.org/github.com/calmh/randomart

Example

data := []byte{ 0x9b, 0x4c, 0x7b, 0xce, 0x7a, 0xbd, 0x0a, 0x13,
                0x61, 0xfb, 0x17, 0xc2, 0x06, 0x12, 0x0c, 0xed }
ra := randomart.Generate(data, "RSA 2048")
fmt.Println(ra)
+--[ RSA 2048 ]---+
|    .+.          |
|      o.         |
|     .. +        |
|      Eo =       |
|        S + .    |
|       o B . .   |
|        B o..    |
|         *...    |
|        .o+...   |
+-----------------+

License

MIT

Documentation

Overview

Package randomart generates OpenSSH style randomart images.

Index

Constants

View Source
const (
	XDim = 17
	YDim = 9
)

Dimensions of the generated image.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	// contains filtered or unexported fields
}

Board is a generated randomart board.

func Generate

func Generate(data []byte, title string) Board

Generate creates a Board to represent the given data by applying the drunken bishop algorithm.

func GenerateSubtitled added in v1.1.0

func GenerateSubtitled(data []byte, title, subtitle string) Board

func (Board) String

func (board Board) String() string

Returns the string representation of the Board, using the OpenSSH ASCII art character set.

Jump to

Keyboard shortcuts

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