utils

package
v0.0.0-...-053e643 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IP_PATTERN = regexp.MustCompile(`((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\.){3})(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)`)

Functions

func FindNeighbors

func FindNeighbors(myHostIP string, myPort uint16, startIP uint8, endIP uint8, startPort uint16, endPort uint16) []string

func GetHost

func GetHost() string

func IsFoundNode

func IsFoundNode(host string, port uint16) bool

func JsonStatus

func JsonStatus(message string) []byte

func StringToBigIntTuples

func StringToBigIntTuples(s string) (big.Int, big.Int)

func StringToPrivateKey

func StringToPrivateKey(s string, publicKey *ecdsa.PublicKey) *ecdsa.PrivateKey

func StringToPublicKey

func StringToPublicKey(s string) *ecdsa.PublicKey

Types

type Signature

type Signature struct {
	R *big.Int
	S *big.Int
}

func StringToSignature

func StringToSignature(s string) *Signature

func (*Signature) String

func (s *Signature) String() string

Jump to

Keyboard shortcuts

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