Documentation
¶
Index ¶
- Constants
- type Addr
- type Client
- type Conn
- func (conn *Conn) Close() error
- func (conn *Conn) LocalAddr() net.Addr
- func (conn *Conn) Read(p []byte) (int, error)
- func (conn *Conn) RemoteAddr() net.Addr
- func (conn *Conn) SetDeadline(t time.Time) error
- func (conn *Conn) SetReadDeadline(t time.Time) error
- func (conn *Conn) SetWriteDeadline(t time.Time) error
- func (conn *Conn) Write(p []byte) (int, error)
- type Server
Constants ¶
const NetworkString = "shs-bs"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Addr ¶
type Addr struct {
PubKey []byte
}
Addr wrapps a net.Addr and adds the public key
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client can dial secret-handshake server endpoints
func NewClient ¶
func NewClient(kp secrethandshake.EdKeyPair, appKey []byte) (*Client, error)
NewClient creates a new Client with the passed keyPair and appKey
func (*Client) ConnWrapper ¶
func (c *Client) ConnWrapper(pubKey []byte) netwrap.ConnWrapper
ConnWrapper returns a connection wrapper for the client.
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is a boxstream wrapped net.Conn
func (*Conn) RemoteAddr ¶
RemoteAddr returns the remote net.Addr with the remote public key
func (*Conn) SetDeadline ¶
SetDeadline passes the call to the underlying net.Conn
func (*Conn) SetReadDeadline ¶
SetReadDeadline passes the call to the underlying net.Conn
func (*Conn) SetWriteDeadline ¶
SetWriteDeadline passes the call to the underlying net.Conn
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server can create net.Listeners
func NewServer ¶
func NewServer(keyPair secrethandshake.EdKeyPair, appKey []byte) (*Server, error)
NewServer returns a Server which uses the passed keyPair and appKey
func (*Server) ConnWrapper ¶
func (s *Server) ConnWrapper() netwrap.ConnWrapper
ConnWrapper returns a connection wrapper.
func (*Server) ListenerWrapper ¶
func (s *Server) ListenerWrapper() netwrap.ListenerWrapper
ListenerWrapper returns a listener wrapper.
Directories
¶
Path | Synopsis |
---|---|
Package boxstream implements npm:pull-box-stream in Go (without the pull) https://github.com/dominictarr/pull-box-stream
|
Package boxstream implements npm:pull-box-stream in Go (without the pull) https://github.com/dominictarr/pull-box-stream |
internal
|
|
Package secrethandshake is a Go implementation of Dominic Tarr's secret-handshake: https://github.com/auditdrivencrypto/secret-handshake Two instances of go-shs can secretly shake hands over a connection.
|
Package secrethandshake is a Go implementation of Dominic Tarr's secret-handshake: https://github.com/auditdrivencrypto/secret-handshake Two instances of go-shs can secretly shake hands over a connection. |
internal/extra25519
Package extra25519 implements the key conversion from ed25519 to curve25519.
|
Package extra25519 implements the key conversion from ed25519 to curve25519. |