client

package
v1.5.16 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessageLimit added in v1.5.14

func GetMessageLimit(msgSize, keySize uint64) uint64

Create PrivateKey by size and return limit message size. Message is raw bytes of body payload without payload head.

Types

type IClient

type IClient interface {
	GetSettings() message.ISettings

	GetPubKey() asymmetric.IPubKey
	GetPrivKey() asymmetric.IPrivKey

	EncryptPayload(asymmetric.IPubKey, payload.IPayload) (message.IMessage, error)
	DecryptMessage(message.IMessage) (asymmetric.IPubKey, payload.IPayload, error)
}

func NewClient

func NewClient(pSett message.ISettings, pPrivKey asymmetric.IPrivKey) IClient

Create client by private key as identification. Handle function is used when the network exists.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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