Documentation
¶
Index ¶
- Constants
- type Client
- type DefaultAuth
- func (s *DefaultAuth) Close() error
- func (s *DefaultAuth) DecodeRead(c io.ReadWriter, b []byte) (int, error)
- func (s *DefaultAuth) Decrypt(b []byte) error
- func (s *DefaultAuth) EncodeWrite(c io.ReadWriter, b []byte) (int, error)
- func (s *DefaultAuth) Encrypt(b []byte) error
- func (s *DefaultAuth) Read(p []byte) (n int, err error)
- func (s *DefaultAuth) Write(p []byte) (n int, err error)
- type Server
Constants ¶
View Source
const ( RANDOM_A = 13 RANDOM_B = 7 RANDOM_M = 256 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultAuth ¶
type DefaultAuth struct { Encode *[256]byte //编码表 Decode *[256]byte //解码表 // contains filtered or unexported fields }
func CreateRandomCipher ¶
func CreateRandomCipher(conn net.Conn, passwd string) (*DefaultAuth, error)
func CreateSimpleCipher ¶
func CreateSimpleCipher(passwd string) (*DefaultAuth, error)
func (*DefaultAuth) Close ¶
func (s *DefaultAuth) Close() error
func (*DefaultAuth) DecodeRead ¶
func (s *DefaultAuth) DecodeRead(c io.ReadWriter, b []byte) (int, error)
func (*DefaultAuth) Decrypt ¶
func (s *DefaultAuth) Decrypt(b []byte) error
func (*DefaultAuth) EncodeWrite ¶
func (s *DefaultAuth) EncodeWrite(c io.ReadWriter, b []byte) (int, error)
func (*DefaultAuth) Encrypt ¶
func (s *DefaultAuth) Encrypt(b []byte) error
Click to show internal directories.
Click to hide internal directories.