stream

package
v0.0.0-...-41355f5 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCipherConn

func NewCipherConn(conn net.Conn, key [32]byte) (net.Conn, error)

func NewCipherConnWithIv

func NewCipherConnWithIv(conn net.Conn, key [32]byte, iv [aes.BlockSize]byte) (net.Conn, error)

func NewCipherSteamConn

func NewCipherSteamConn(conn net.Conn, aesKey [32]byte) net.Conn

func NewStreamBuf

func NewStreamBuf() []byte

func NewStreamFixedSizeConn

func NewStreamFixedSizeConn(size int, conn net.Conn) net.Conn

func PaddingStream

func PaddingStream(data []byte) (n int, paddingData []byte, err error)

func RealLen

func RealLen(shadowLen uint32) int

func ShadowLen

func ShadowLen(l int) (uint32, error)

func UnPaddingStream

func UnPaddingStream(data []byte) (n int, realData []byte, err error)

Types

type CipherConn

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

func (*CipherConn) GetIV

func (cc *CipherConn) GetIV() [aes.BlockSize]byte

func (*CipherConn) Read

func (cc *CipherConn) Read(b []byte) (n int, err error)

func (*CipherConn) Write

func (cc *CipherConn) Write(b []byte) (n int, err error)

type StreamConn

type StreamConn struct {
	net.Conn
}

func (*StreamConn) Read

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

func (*StreamConn) Write

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

type StreamFixedSizeConn

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

Jump to

Keyboard shortcuts

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