Documentation ¶
Index ¶
- Variables
- func InitiateHandshake(rw io.ReadWriter, skey []byte, initialPayload []byte) (ret io.ReadWriter, err error)
- func ReceiveHandshake(rw io.ReadWriter, skeys [][]byte) (ret io.ReadWriter, err error)
- func ReceiveHandshakeLazy(rw io.ReadWriter, skeys SecretKeyIter) (ret io.ReadWriter, err error)
- type SecretKeyIter
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 ¶
A function that given a function, calls it with secret keys until it returns false or exhausted.
Click to show internal directories.
Click to hide internal directories.