mse

package
v0.0.0-...-ac0af8e Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2017 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSecretKeyMatch = errors.New("no skey matched")

Functions

func InitiateHandshake

func InitiateHandshake(rw io.ReadWriter, skey []byte, initialPayload []byte) (ret io.ReadWriter, err error)

func ReceiveHandshake

func ReceiveHandshake(rw io.ReadWriter, skeys [][]byte) (ret io.ReadWriter, err error)

func ReceiveHandshakeLazy

func ReceiveHandshakeLazy(rw io.ReadWriter, skeys SecretKeyIter) (ret io.ReadWriter, err error)

Doesn't unpack the secret keys until it needs to, and through the passed function.

Types

type SecretKeyIter

type SecretKeyIter func(callback func(skey []byte) (more bool))

A function that given a function, calls it with secret keys until it returns false or exhausted.

Jump to

Keyboard shortcuts

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