Documentation
¶
Index ¶
Constants ¶
View Source
const ( Undefined CommandCodes = 0 CNN = 1 //Connect MSG = 2 //Message RKS = 3 //Register Keys BKS = 4 //Broadcast Keys, this command is temporary and must be removed )
View Source
const MessageSize = 980
View Source
const RegisterKeysSize = 176
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastKeys ¶
type BroadcastKeys struct { }
func (BroadcastKeys) ToCommand ¶
func (m BroadcastKeys) ToCommand(syncId uint8) Command
ToCommand implements commands.IOut.
type CommandCodes ¶
type CommandCodes uint16
type Header ¶
type Header struct { Version uint16 SyncId uint8 Id CommandCodes }
func NewHeader ¶
func NewHeader(id CommandCodes, sync uint8) Header
type Message ¶
type Message struct { Recipient UserName InitialVector [12]byte //TODO READ IV SIZE from e2ee Len int32 Message [MessageSize]byte }
func NewMessage ¶
type RegisterKeys ¶
type RegisterKeys struct { User UserName IdKey [32]byte SignedKey [32]byte Signature [64]byte EphemeralKey [32]byte //will be removed later when we implement a direct way of communication }
func NewRegisterKeys ¶
func NewRegisterKeys(body []byte) (*RegisterKeys, error)
func (RegisterKeys) ToCommand ¶
func (r RegisterKeys) ToCommand(syncId uint8) Command
ToCommand implements commands.IOut.
Click to show internal directories.
Click to hide internal directories.