Versions in this module Expand all Collapse all v0 v0.3.2 May 25, 2022 v0.3.1 Apr 19, 2022 Changes in this version + func Hash(password string) []byte v0.3.0 Apr 19, 2022 Changes in this version + func ClientHandshake(conn net.Conn, hostPort, password string) error + func ClientHandshakeTimeout(conn net.Conn, hostPort, password string, timeout time.Duration) error + func Dial(network, address, hostPort, password string, config *tls.Config) (*tls.Conn, error) + func DialTimeout(network, address, hostPort, password string, config *tls.Config, ...) (*tls.Conn, error) + func ServerHandshake(conn net.Conn, auth AuthMethod) (network string, hostPort string, err error) + func ServerHandshakeTimeout(conn net.Conn, auth AuthMethod, timeout time.Duration) (network string, hostPort string, err error) + type AuthFailure string + func (a AuthFailure) Error() string + type AuthMethod interface + Auth func(password string) bool + Method func() string + type AuthPassword struct + Map map[string]int + func NewAuthPasswordMap(m map[string]int) *AuthPassword + func NewAuthPasswordSlice(slice []string) *AuthPassword + func (a *AuthPassword) Auth(password string) bool + func (a *AuthPassword) Method() string + type Listener struct + func Listen(network, address string, auth AuthMethod, config *tls.Config) (*Listener, error) + func ListenTimeout(network, address string, auth AuthMethod, config *tls.Config, ...) (*Listener, error) + func (l *Listener) Accept() (conn net.Conn, network, hostPort string, err error)