security

package
v1.0.1-rc1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fingerprint

type Fingerprint uint64

Fingerprint represents hardware fingerprint

func GetHardware

func GetHardware() Fingerprint

GetHardware retrieves the hardware address fingerprint which is based on the address of the first interface encountered.

func (Fingerprint) Hex

func (f Fingerprint) Hex() string

Hex returns the string in hex format.

func (Fingerprint) String

func (f Fingerprint) String() string

String encodes PeerName as a string.

type ID

type ID uint64

ID represents a process-wide unique ID.

func NewID

func NewID() ID

NewID generates a new, process-wide unique ID.

func (ID) String

func (id ID) String() string

String converts the ID to a string representation.

func (ID) Unique

func (id ID) Unique(prefix uint64, salt string) string

Unique generates unique id based on the current id with a prefix and salt.

Jump to

Keyboard shortcuts

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