Documentation
¶
Index ¶
- func GetEncryptionList() []string
- func RegisterEncryption(name string, action EncryptionAction) error
- type EncryptionAction
- type KeypairAes
- func (this *KeypairAes) Decrypt(data []byte) ([]byte, error)
- func (this *KeypairAes) Encrypt(data []byte) ([]byte, error)
- func (this *KeypairAes) GenBytes(bytesLen int) []byte
- func (this *KeypairAes) InitUser(conn net.Conn, param string) error
- func (this *KeypairAes) SafeRead(conn net.Conn, length int) ([]byte, error)
- func (this *KeypairAes) StrPadding(str string) string
- type PskAes256Cfb
- type PskAesCfb
- type PskRc4Md5
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEncryptionList ¶
func GetEncryptionList() []string
func RegisterEncryption ¶
func RegisterEncryption(name string, action EncryptionAction) error
Types ¶
type EncryptionAction ¶
type EncryptionAction interface {
//InitUser,连接代理服务器后进行的初始化操作
//conn:服务器的连接套接字
//param:配置文件里面填写的EncryptionParam
InitUser(conn net.Conn, param string) error
//Encrypt,加密
//data:源数据
//输出 加密后的数据 与 一个error(若发生了错误)
Encrypt(data []byte) ([]byte, error)
//Decrypt,解密
//data:加密数据
//输出 解密后的数据 与 一个error(若发生了错误)
Decrypt(data []byte) ([]byte, error)
}
func GetEncryption ¶
func GetEncryption(name string) (EncryptionAction, bool)
type KeypairAes ¶
func (*KeypairAes) GenBytes ¶
func (this *KeypairAes) GenBytes(bytesLen int) []byte
func (*KeypairAes) StrPadding ¶
func (this *KeypairAes) StrPadding(str string) string
type PskAes256Cfb ¶
Click to show internal directories.
Click to hide internal directories.