Documentation ¶
Index ¶
Constants ¶
View Source
const MAX_PACKET_SIZE = 64 * 1204
Variables ¶
View Source
var ErrShortPacket = errors.New("short packet")
Functions ¶
func GetStreamCiphers ¶
func GetStreamCiphers() map[string]IStreamCipher
func GetStreamConnCiphers ¶
func GetStreamPacketCiphers ¶
func GetStreamPacketCiphers(method string) func(string, net.PacketConn) (net.PacketConn, error)
Types ¶
type IStreamCipher ¶
type IStreamCipher interface { KeyLen() int IVLen() int // decryptOrEncrypt 0: encrypt 1: decrypt NewStream(key []byte, iv []byte, decryptOrEncrypt int) (cipher.Stream, error) }
func GetStreamCipher ¶
func GetStreamCipher(method string) IStreamCipher
Click to show internal directories.
Click to hide internal directories.