mse

package
v0.0.0-...-eed0743 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2017 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CryptoMethodPlaintext = 1
	CryptoMethodRC4       = 2
	AllSupportedCrypto    = CryptoMethodPlaintext | CryptoMethodRC4
)

Variables

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

Functions

func DefaultCryptoSelector

func DefaultCryptoSelector(provided uint32) uint32

func InitiateHandshake

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

func ReceiveHandshake

func ReceiveHandshake(rw io.ReadWriter, skeys SecretKeyIter, selectCrypto func(uint32) uint32) (ret io.ReadWriter, err error)

Types

type CryptoSelector

type CryptoSelector func(uint32) uint32

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