cryptconn

package
v2.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2014 License: BSD-3-Clause, GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEYSIZE     = 16
	DEBUGOUTPUT = false
)

Variables

This section is empty.

Functions

func NewBlock

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

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