types

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MPL-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

View Source
const (
	NoisePublicKeySize    = 32
	NoisePrivateKeySize   = 32
	NoisePresharedKeySize = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MaybeAddrPort added in v0.27.0

type MaybeAddrPort netip.AddrPort

MaybeAddrPort is a type that can be either an address or an address with a port.

func MustParseMaybeAddrPort added in v0.27.0

func MustParseMaybeAddrPort(text string) MaybeAddrPort

MustParseMaybeAddrPort is a helper function that parses a MaybeAddrPort from a string.

func (MaybeAddrPort) MarshalText added in v0.27.0

func (m MaybeAddrPort) MarshalText() ([]byte, error)

Custom marshal text for MaybeAddrPort, if the port is '0', it is omitted.

func (MaybeAddrPort) String added in v0.27.0

func (m MaybeAddrPort) String() string

func (*MaybeAddrPort) UnmarshalText added in v0.27.0

func (m *MaybeAddrPort) UnmarshalText(text []byte) error

Custom unmarshal text for MaybeAddrPort, if no port is specified, a default port of '0' is used.

type NoiseNonce

type NoiseNonce uint64 // padded to 12-bytes

type NoisePresharedKey

type NoisePresharedKey [NoisePresharedKeySize]byte

type NoisePrivateKey

type NoisePrivateKey [NoisePrivateKeySize]byte

func NewPrivateKey

func NewPrivateKey() (sk NoisePrivateKey, err error)

func (NoisePrivateKey) Equals

func (sk NoisePrivateKey) Equals(tar NoisePrivateKey) bool

func (NoisePrivateKey) Public added in v0.15.0

func (sk NoisePrivateKey) Public() (pk NoisePublicKey)

func (NoisePrivateKey) String

func (sk NoisePrivateKey) String() string

func (*NoisePrivateKey) UnmarshalText added in v0.18.0

func (sk *NoisePrivateKey) UnmarshalText(text []byte) error

type NoisePublicKey

type NoisePublicKey [NoisePublicKeySize]byte

func (NoisePublicKey) DisplayString added in v0.15.0

func (pk NoisePublicKey) DisplayString() string

func (NoisePublicKey) Equals

func (pk NoisePublicKey) Equals(tar NoisePublicKey) bool

func (NoisePublicKey) String

func (pk NoisePublicKey) String() string

func (*NoisePublicKey) UnmarshalText added in v0.18.0

func (pk *NoisePublicKey) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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