smanager

package
v0.0.0-...-d9fdf4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidOperation = errors.New("invalid operation")
)

Functions

func GenRandom

func GenRandom() []byte

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL