Help us shape the future of Go! Take the 2026 Go Developer Survey

messages

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CRC16("github.com/privatix/dappctrl/client/svcrun") = 0x7FDE
	ErrWrongSignature errors.Error = 0x7FDE<<8 + iota
)

Errors.

Variables

This section is empty.

Functions

func AgentSeal

func AgentSeal(msg, clientPub []byte, agentKey *ecdsa.PrivateKey) ([]byte, error)

AgentSeal encrypts message using client's public key and packs with agent signature.

func ClientOpen

func ClientOpen(c, agentPub []byte, clientPrv *ecdsa.PrivateKey) ([]byte, error)

ClientOpen decrypts message using client's key and verifies using agent's key.

func PackWithSignature

func PackWithSignature(msg []byte, key *ecdsa.PrivateKey) ([]byte, error)

PackWithSignature packs message with signature.

func UnpackSignature

func UnpackSignature(c []byte) (msg []byte, sig []byte)

UnpackSignature unpacks msg from signature.

func VerifySignature

func VerifySignature(pubk, msg, sig []byte) bool

VerifySignature returns true if signature is correct.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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