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, aead cipher.AEAD) io.Reader + func NewWriter(w io.Writer, aead cipher.AEAD) io.Writer + func Pack(dst, plaintext []byte, ciph Cipher) ([]byte, error) + func Unpack(dst, pkt []byte, ciph Cipher) ([]byte, error) + type Cipher interface + Decrypter func(salt []byte) (cipher.AEAD, error) + Encrypter func(salt []byte) (cipher.AEAD, error) + KeySize func() int + SaltSize func() int + func AESGCM(psk []byte) (Cipher, error) + func Chacha20Poly1305(psk []byte) (Cipher, error) + type KeySizeError int + func (e KeySizeError) Error() string