util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAndParseConfigFile

func FindAndParseConfigFile(configFile string, out interface{}) error

FindAndParseConfigFile locates the config file and parses it, storing the result in out.

func GetConfigFileLocation

func GetConfigFileLocation(location string) (string, error)

func GetDefaultKeyLocation

func GetDefaultKeyLocation() (string, error)

func Hash160

func Hash160(buf []byte) []byte

Hash160 calculates the hash ripemd160(sha256(b)).

func Hash256

func Hash256(data []byte) []byte

Hash256 does two rounds of SHA256 hashing.

func NowMs

func NowMs() int64

NowMs returns current time as milliseconds from epoch.

func TimeFromMs

func TimeFromMs(ts int64) time.Time

func ValidateName

func ValidateName(name string) bool

ValidateName returns true if the name is valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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