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 ¶ added in v1.19.3
type HistoryUpdate struct { Offset pk.VarInt Acknowledged pk.FixedBitSet // n == 20 }
type Message ¶ added in v1.19.3
type Message struct { Prev Prev Signature *Signature *MessageBody Unsigned *chat.Message FilterMask }
type MessageBody ¶
type PackedMessageBody ¶ added in v1.19.3
type PackedMessageBody struct { PlainMsg string Timestamp time.Time Salt int64 LastSeen []PackedSignature }
func (*PackedMessageBody) ReadFrom ¶ added in v1.19.3
func (m *PackedMessageBody) ReadFrom(r io.Reader) (n int64, err error)
func (*PackedMessageBody) Unpack ¶ added in v1.19.3
func (m *PackedMessageBody) Unpack(cache *SignatureCache) (*MessageBody, error)
type PackedSignature ¶ added in v1.19.3
type Session ¶ added in v1.19.3
type Session struct { SessionID uuid.UUID PublicKey user.PublicKey // contains filtered or unexported fields }
func (*Session) InitValidate ¶ added in v1.19.3
func (s *Session) InitValidate()
func (*Session) VerifyAndUpdate ¶ added in v1.19.3
type Signature ¶ added in v1.19.3
type Signature [256]byte
type SignatureCache ¶ added in v1.19.3
type SignatureCache struct {
// contains filtered or unexported fields
}
func NewSignatureCache ¶ added in v1.19.3
func NewSignatureCache() SignatureCache
func (*SignatureCache) PopOrInsert ¶ added in v1.19.3
func (s *SignatureCache) PopOrInsert(self *Signature, lastSeen []*Signature)
Click to show internal directories.
Click to hide internal directories.