Documentation
¶
Index ¶
- Variables
- func DecryptResponse(body []byte) ([]byte, error)
- func Encrypt(req EncryptRequest, publicKey PublicKeyState, session Session) (map[string]string, error)
- func Sign(timestamp, nonce string) string
- type EncryptRequest
- type HTTPDoer
- type KeyClient
- type Manager
- type ManagerOptions
- type PublicKeyState
- type Session
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPublicKeyMissing = errors.New("xeapi public key is missing") ErrSessionKeyLength = errors.New("xeapi session key length is invalid") )
Functions ¶
func DecryptResponse ¶
func Encrypt ¶
func Encrypt(req EncryptRequest, publicKey PublicKeyState, session Session) (map[string]string, error)
Types ¶
type EncryptRequest ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(opts ManagerOptions) *Manager
func (*Manager) SetSession ¶
type ManagerOptions ¶
type PublicKeyState ¶
type PublicKeyState struct {
PublicKey string `json:"publicKey"`
Version string `json:"version"`
NextUpdateTime int64 `json:"nextUpdateTime"`
SK string `json:"sk"`
DeviceID string `json:"deviceId,omitempty"`
}
func DecryptPublicKey ¶
func DecryptPublicKey(encryptedData string) (PublicKeyState, error)
Click to show internal directories.
Click to hide internal directories.