cryptconn

package
v2.4.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2016 License: BSD-3-Clause, GPL-2.0 Imports: 11 Imported by: 11

Documentation

Index

Constants

View Source
const (
	KEYSIZE           = 16
	DEBUGOUTPUT       = false
	HANDSHAKE_TIMEOUT = 30 * time.Second
)

Variables

This section is empty.

Functions

func ExchangeIV

func ExchangeIV(conn net.Conn, n int) (iv []byte, err error)

func NewBlock

func NewBlock(method string, key string) (c cipher.Block, err error)

func RecvIV

func RecvIV(conn net.Conn, n int) (iv []byte, err error)

func SentIV

func SentIV(conn net.Conn, n int) (iv []byte, err error)

func XOR

func XOR(n int, a []byte, b []byte) (r []byte)

Types

type CryptConn

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

func NewClient

func NewClient(conn net.Conn, block cipher.Block) (sc CryptConn, err error)

func NewServer

func NewServer(conn net.Conn, block cipher.Block) (sc *CryptConn, err error)

func (CryptConn) Read

func (sc CryptConn) Read(b []byte) (n int, err error)

func (CryptConn) Write

func (sc CryptConn) Write(b []byte) (n int, err error)

type Dialer

type Dialer struct {
	sutils.Dialer
	// contains filtered or unexported fields
}

func NewDialer

func NewDialer(dialer sutils.Dialer, method string, key string) (d *Dialer, err error)

func (*Dialer) Dial

func (d *Dialer) Dial(network, addr string) (conn net.Conn, err error)

type Listener

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

func NewListener

func NewListener(listener net.Listener, method string, key string) (l *Listener, err error)

func (*Listener) Accept

func (l *Listener) Accept() (conn net.Conn, err error)

Jump to

Keyboard shortcuts

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