Documentation ¶
Index ¶
- Variables
- func GenRandom() []byte
- type KeyManager
- func (t *KeyManager) AddKeyWatcher(handler WatchKeyHandler)
- func (t *KeyManager) CheckSecretKey() bool
- func (t *KeyManager) GetAuthData(peerId string) ([]byte, error)
- func (t *KeyManager) GetRequestKeyData(peerId string) ([]byte, error)
- func (t *KeyManager) GetResponseKeyData(peerId string) ([]byte, error)
- func (t *KeyManager) GetVerifyData(peerId string) ([]byte, error)
- func (t *KeyManager) VerifyAuth(authData []byte, peerId string) error
- func (t *KeyManager) VerifyRemoteVerify(verifyData []byte, peerId string) error
- func (t *KeyManager) VerifyRequestKeyData(request []byte, peerId string) error
- func (t *KeyManager) VerifyResponseKey(response []byte, peerId string) error
- type WatchKeyHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidOperation = errors.New("invalid operation")
)
Functions ¶
Types ¶
type KeyManager ¶
type KeyManager struct {
// contains filtered or unexported fields
}
func NewKeyManager ¶
func NewKeyManager(pk *ecies.PrivateKey) *KeyManager
func (*KeyManager) AddKeyWatcher ¶
func (t *KeyManager) AddKeyWatcher(handler WatchKeyHandler)
func (*KeyManager) CheckSecretKey ¶
func (t *KeyManager) CheckSecretKey() bool
CheckSecretKey check secretkey already exist or not.
func (*KeyManager) GetAuthData ¶
func (t *KeyManager) GetAuthData(peerId string) ([]byte, error)
GetAuthData generate a remote report at begin of a auth-verify process.
func (*KeyManager) GetRequestKeyData ¶
func (t *KeyManager) GetRequestKeyData(peerId string) ([]byte, error)
GetRequestKeyData generate a remote report used to request secret key.
func (*KeyManager) GetResponseKeyData ¶
func (t *KeyManager) GetResponseKeyData(peerId string) ([]byte, error)
GetResponseKeyData generate a remote report used to request secret key.
func (*KeyManager) GetVerifyData ¶
func (t *KeyManager) GetVerifyData(peerId string) ([]byte, error)
GetVerifyData generate a remote report used to verify remote peer..
func (*KeyManager) VerifyAuth ¶
func (t *KeyManager) VerifyAuth(authData []byte, peerId string) error
VerifyAuth verify auth data received from remote peer
func (*KeyManager) VerifyRemoteVerify ¶
func (t *KeyManager) VerifyRemoteVerify(verifyData []byte, peerId string) error
VerifyRemoteVerify verify remote verify-data received from remote peer..
func (*KeyManager) VerifyRequestKeyData ¶
func (t *KeyManager) VerifyRequestKeyData(request []byte, peerId string) error
VerifyRequestKeyData verify remote verify-data received from remote peer..
func (*KeyManager) VerifyResponseKey ¶
func (t *KeyManager) VerifyResponseKey(response []byte, peerId string) error
VerifyResponseKey verify remote verify-data received from remote peer..
type WatchKeyHandler ¶
type WatchKeyHandler func([]byte)
Click to show internal directories.
Click to hide internal directories.