Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewShadowConn ¶
func NewShadowConn(conn net.Conn, cipher AEADCipher) net.Conn
Types ¶
type AEADCipher ¶
type AEADCipher interface { KeySize() int SaltSize() int NonceSize() int TagSize() int // singleton cipher during the whole app lifecycle // but salt differs for each connection Encrypter(salt []byte) (cipher.AEAD, error) Decrypter(salt []byte) (cipher.AEAD, error) GenSalt() ([]byte, error) GenNonce() []byte }
func NewAEADCipher ¶
func NewAEADCipher(name, password string) (AEADCipher, error)
type ShadowConn ¶
ShadowConn is a wrapper around a net.Conn that encrypts/decrypts all data passing through it.
Click to show internal directories.
Click to hide internal directories.