package
1.0.0-29g
Repository: https://github.com/alex/client-beta.git
Documentation: pkg.go.dev

# Functions

BodyDecode takes a base64-encoded msgpack and turns it into a message body.
NewMeta creates a new Meta object.
NewMsg creates a kex message from metadata and a body.
NewReceiver creates a Receiver that will route messages to the provided handler.
NewSecret creates a new random secret for a user.
NewSender creates a Sender for the given message direction.
SecretFromPhrase creates a secret for a user give a secret phrase.

# Constants

These are the valid message names for kex.
DirectionXtoY is for messages intended for device Y from device X.
DirectionYtoX is for messages intended for device X from device Y.
These are the valid message names for kex.
These are the valid message names for kex.
These are the valid message names for kex.
These are the valid message names for kex.
These are the valid message names for kex.

# Variables

ErrMACMismatch is returned when a MAC fails.
ErrProtocolEOF is returned by Receive when the message body has the EOF flag set.
ErrStrongIDMismatch is returned when the strong session ID (I) in a message fails to match the receiver's strong session ID.
ErrWeakIDMismatch is returned when the weak session ID (w) in a message fails to match the receiver's weak session ID.
HelloTimeout is the time the kex protocol will wait for the hello message from the existing sibling device.
IntraTimeout is the time the kex protocol will wait for messages once the key exchange has begun.
PollDuration is the long poll duration for a kex/receive api call.
StartTimeout is the duration the existing sibling device will wait for a start message.

# Structs

Body is the message body.
Meta is the metadata that is sent with every kex message.
Msg is a kex message.
MsgArgs contains the union of all the args for the kex message protocol interface.
Receiver gets kex messages from the server and routes them to a kex Handler.
Secret generates kex shared secrets.
Sender is an implementation of the kex Handler interface that sends messages to the api server.

# Interfaces

Handler is the key exchange protocol interface.

# Type aliases

Direction of the message.
MsgList is an array of messages that can sort by seqno.
MsgName is for message names.
SecretKey is the shared secret key type.
StrongID is the strong session id type.
WeakID is the weak session id type.