core: Index | Files

package utils

import ""


Package Files

addr.go asciiBytesToPrintString.go ctIsZero.go explicitBzero.go mkDataDir.go

func ASCIIBytesToPrintString Uses

func ASCIIBytesToPrintString(b []byte) string

ASCIIBytesToPrintString converts the buffer b to the closest ASCII string equivalent, substituting '*' for unprintable characters.

func CtIsZero Uses

func CtIsZero(b []byte) bool

CtIsZero returns true iff the buffer b is all 0x00, doing the check in constant time.

func EnsureAddrIPPort Uses

func EnsureAddrIPPort(a string) error

EnsureAddrIPPort returns nil iff the address is a raw IP + Port combination.

func ExplicitBzero Uses

func ExplicitBzero(b []byte)

ExplicitBzero explicitly clears out the buffer b, by filling it with 0x00 bytes.

func GetExternalIPv4Address Uses

func GetExternalIPv4Address() (net.IP, error)

GetExternalIPv4Address attempts to guess an external IPv4 address by interface enumeration.

func MkDataDir Uses

func MkDataDir(f string) error

MkDataDir creates a data directory of appropriate (paranoid) permissions if it does not exist, and validates that existing directories have the intended permissions if it does exist.

Package utils imports 4 packages (graph) and is imported by 25 packages. Updated 2018-02-23. Refresh now. Tools for package owners.