crypto

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: AGPL-3.0, BSD-3-Clause Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShutdownErrMessage = "panda: shutdown requested"

Functions

This section is empty.

Types

type KeyExchange

type KeyExchange struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewKeyExchange

func NewKeyExchange(rand io.Reader, log *logging.Logger, meetingPlace MeetingPlace, sharedSecret []byte, kxBytes []byte, contactID uint64, pandaChan chan PandaUpdate, shutdownChan chan struct{}) (*KeyExchange, error)

func UnmarshalKeyExchange

func UnmarshalKeyExchange(rand io.Reader, log *logging.Logger, meetingPlace MeetingPlace, serialised []byte, contactID uint64, pandaChan chan PandaUpdate, shutdownChan chan struct{}) (*KeyExchange, error)

func (*KeyExchange) Marshal

func (kx *KeyExchange) Marshal() []byte

func (*KeyExchange) Run

func (kx *KeyExchange) Run()

type MeetingPlace

type MeetingPlace interface {
	Padding() int
	Exchange(id, message []byte, shutdown chan struct{}) ([]byte, error)
}

type PandaUpdate

type PandaUpdate struct {
	ID         uint64
	Err        error
	Serialised []byte
	Result     []byte
}

Directories

Path Synopsis
Package panda is a generated protocol buffer package.
Package panda is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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