Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorBase64 = errors.New("base64 decode error")
View Source
var ErrorCipher = errors.New("cipher decrypt error")
View Source
var ErrorParse = errors.New("ip parse error")
Functions ¶
func ErrorsJoin ¶
Types ¶
type TokenCipher ¶
type TokenCipher interface {
Encode(addr netip.Addr) (token string)
Decode(token string) (netip.Addr, error)
}
func NewTokenCipher ¶
func NewTokenCipher(secret string) (TokenCipher, error)
Click to show internal directories.
Click to hide internal directories.