curve

package
v0.0.0-...-5f01694 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const MechName = "CURVE"

Variables

View Source
var ErrBothClients bothClients
View Source
var ErrBothServers bothServers

Functions

func GenerateKeys

func GenerateKeys(pub, sec *[32]byte)

func PopulateSecKey

func PopulateSecKey(sec *[32]byte)

Types

type Curve

type Curve struct {
	// contains filtered or unexported fields
}

func (*Curve) Handshake

func (c *Curve) Handshake(conn net.Conn, meta zmtp.Metadata) (
	zmtp.Socket,
	zmtp.Metadata,
	error,
)

Handshake performs a null mechanism handshake.

func (*Curve) Name

func (c *Curve) Name() string

func (*Curve) Server

func (c *Curve) Server() bool

func (*Curve) SetOption

func (c *Curve) SetOption(option string, val any) error

func (*Curve) SetupClient

func (c *Curve) SetupClient()

func (*Curve) SetupServer

func (c *Curve) SetupServer()

func (*Curve) ValidateGreeting

func (c *Curve) ValidateGreeting(g *zmtp.Greeting) error

type CurveClient

type CurveClient struct {
	// contains filtered or unexported fields
}

func (*CurveClient) Handshake

func (c *CurveClient) Handshake(conn net.Conn, meta zmtp.Metadata) (
	zmtp.Socket,
	zmtp.Metadata,
	error,
)

type CurveServer

type CurveServer struct {
	// contains filtered or unexported fields
}

func (*CurveServer) Handshake

func (c *CurveServer) Handshake(conn net.Conn, meta zmtp.Metadata) (
	zmtp.Socket,
	zmtp.Metadata,
	error,
)

type CurveSocket

type CurveSocket struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*CurveSocket) Close

func (c *CurveSocket) Close() error

func (*CurveSocket) Net

func (n *CurveSocket) Net() net.Conn

Net returns the underlying net.Conn for the socket.

func (*CurveSocket) Read

func (c *CurveSocket) Read() (zmtp.CommandOrMessage, error)

func (*CurveSocket) SendCommand

func (c *CurveSocket) SendCommand(cmd zmtp.Command) error

func (*CurveSocket) SendMessage

func (c *CurveSocket) SendMessage(msg zmtp.Message) error

type Nonce

type Nonce [24]byte

func (*Nonce) FromLong

func (n *Nonce) FromLong(prefix string, long []byte)

func (*Nonce) Long

func (n *Nonce) Long(prefix string)

func (*Nonce) N

func (n *Nonce) N() *[24]byte

func (*Nonce) Short

func (n *Nonce) Short(prefix string, nonce uint64)

Jump to

Keyboard shortcuts

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