Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UncachedSignature = errors.New("uncached signature")
Functions ¶
This section is empty.
Types ¶
type FilterMask ¶
type HistoryMessage ¶
type HistoryUpdate ¶
type HistoryUpdate struct { Offset pk.VarInt Acknowledged pk.FixedBitSet // n == 20 }
type Message ¶
type Message struct { Prev Prev Signature *Signature *MessageBody Unsigned *chat.Message FilterMask }
type MessageBody ¶
type PackedMessageBody ¶
type PackedMessageBody struct { PlainMsg string Timestamp time.Time Salt int64 LastSeen []PackedSignature }
func (*PackedMessageBody) ReadFrom ¶
func (m *PackedMessageBody) ReadFrom(r io.Reader) (n int64, err error)
func (*PackedMessageBody) Unpack ¶
func (m *PackedMessageBody) Unpack(cache *SignatureCache) (*MessageBody, error)
type PackedSignature ¶
type Session ¶
type Session struct { SessionID uuid.UUID PublicKey user.PublicKey // contains filtered or unexported fields }
func (*Session) InitValidate ¶
func (s *Session) InitValidate()
func (*Session) VerifyAndUpdate ¶
type SignatureCache ¶
type SignatureCache struct {
// contains filtered or unexported fields
}
func NewSignatureCache ¶
func NewSignatureCache() SignatureCache
func (*SignatureCache) PopOrInsert ¶
func (s *SignatureCache) PopOrInsert(self *Signature, lastSeen []*Signature)
Click to show internal directories.
Click to hide internal directories.