Versions in this module Expand all Collapse all v0 v0.0.9 Apr 15, 2018 Changes in this version + var ErrShortPacket = errors.New("short packet") + func NewConn(c net.Conn, ciph Cipher) net.Conn + func NewPacketConn(c net.PacketConn, ciph Cipher) net.PacketConn + func NewReader(r io.Reader, s cipher.Stream) io.Reader + func NewWriter(w io.Writer, s cipher.Stream) io.Writer + func Pack(dst, plaintext []byte, s Cipher) ([]byte, error) + func Unpack(dst, pkt []byte, s Cipher) ([]byte, error) + type Cipher interface + Decrypter func(iv []byte) cipher.Stream + Encrypter func(iv []byte) cipher.Stream + IVSize func() int + func AESCFB(key []byte) (Cipher, error) + func AESCTR(key []byte) (Cipher, error) + func Chacha20IETF(key []byte) (Cipher, error) + func Xchacha20(key []byte) (Cipher, error) + type KeySizeError int + func (e KeySizeError) Error() string