encrypt

package
v0.0.0-...-198281b Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCipherMethod

func CheckCipherMethod(method string) error

func GetCipherMethods

func GetCipherMethods() (keys []string)

func NewConn

func NewConn(c net.Conn, method, password string) (conn net.Conn, err error)

Types

type Cipher

type Cipher struct {
	WriteStream cipher.Stream
	ReadStream  cipher.Stream
	// contains filtered or unexported fields
}

func NewCipher

func NewCipher(method, password string) (c *Cipher, err error)

type Conn

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

func (*Conn) Close

func (s *Conn) Close() (err error)

func (*Conn) Read

func (s *Conn) Read(b []byte) (n int, err error)

func (*Conn) Write

func (s *Conn) Write(b []byte) (n int, err error)

type DecOrEnc

type DecOrEnc int
const (
	Decrypt DecOrEnc = iota
	Encrypt
)

Jump to

Keyboard shortcuts

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