Documentation
¶
Index ¶
- func OfbEncrypt(key, data []byte) ([]byte, error)
- type Client
- type ClientConfig
- type Sm9Auth
- type User
- func (u *User) GetEncryptMasterPublicKey() *sm9.EncryptMasterPublicKey
- func (u *User) GetEncryptPrivateKey() *sm9.EncryptPrivateKey
- func (u *User) GetSignMasterPublicKey() *sm9.SignMasterPublicKey
- func (u *User) GetSignPrivateKey() *sm9.SignPrivateKey
- func (u *User) SetEncryptMasterPublicKey(encMasterPublicKey string) error
- func (u *User) SetEncryptPrivateKey(encPrivateKey string) error
- func (u *User) SetSignMasterPublicKey(signMasterPublicKey string) error
- func (u *User) SetSignPrivateKey(signPrivateKey string) error
- type UserConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OfbEncrypt ¶ added in v0.0.8
Types ¶
type Client ¶
type Client struct { ServerUrl *url.URL AuthHandler *Sm9Auth User *User Cm *autopaho.ConnectionManager Cancel context.CancelFunc Config *ClientConfig MsgHandler paho.MessageHandler }
func (*Client) Disconnect ¶
func (*Client) SetMsgHandler ¶ added in v0.0.6
func (c *Client) SetMsgHandler(handler paho.MessageHandler)
type ClientConfig ¶ added in v0.0.2
type Sm9Auth ¶
func NewSm9Auth ¶
func (*Sm9Auth) Authenticated ¶
func (s *Sm9Auth) Authenticated()
func (*Sm9Auth) GetRandom1 ¶
type User ¶
type User struct { Uid []byte Hid byte SessionKey []byte // contains filtered or unexported fields }
func NewUser ¶
func NewUser(conf *UserConfig) *User
func (*User) GetEncryptMasterPublicKey ¶ added in v0.0.2
func (u *User) GetEncryptMasterPublicKey() *sm9.EncryptMasterPublicKey
func (*User) GetEncryptPrivateKey ¶ added in v0.0.2
func (u *User) GetEncryptPrivateKey() *sm9.EncryptPrivateKey
func (*User) GetSignMasterPublicKey ¶ added in v0.0.2
func (u *User) GetSignMasterPublicKey() *sm9.SignMasterPublicKey
func (*User) GetSignPrivateKey ¶ added in v0.0.2
func (u *User) GetSignPrivateKey() *sm9.SignPrivateKey
func (*User) SetEncryptMasterPublicKey ¶ added in v0.0.2
func (*User) SetEncryptPrivateKey ¶ added in v0.0.2
func (*User) SetSignMasterPublicKey ¶ added in v0.0.2
func (*User) SetSignPrivateKey ¶ added in v0.0.2
type UserConfig ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.