encryption

package
v1.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCryptoStore

func GetCryptoStore(_ bool, db *sql.DB, config *configuration.Matrix) (crypto.Store, id.DeviceID, error)

GetCryptoStore initializes a sql crypto store

func GetOlmMachine

func GetOlmMachine(debug bool, client *mautrix.Client, store crypto.Store, _ types.Database, stateStore *StateStore) *crypto.OlmMachine

GetOlmMachine initializes a new olm machine

Types

type StateStore

type StateStore struct {
	// contains filtered or unexported fields
}

func NewStateStore

func NewStateStore(database types.Database, config *configuration.Matrix) *StateStore

NewStateStore returns a new state store

func (*StateStore) FindSharedRooms

func (store *StateStore) FindSharedRooms(userID id.UserID) []id.RoomID

func (*StateStore) GetEncryptionEvent

func (store *StateStore) GetEncryptionEvent(roomID id.RoomID) *event.EncryptionEventContent

func (*StateStore) GetUserIDs

func (store *StateStore) GetUserIDs(roomID string) []id.UserID

func (*StateStore) IsEncrypted

func (store *StateStore) IsEncrypted(roomID id.RoomID) bool

IsEncrypted returns whether a room is encrypted.

func (*StateStore) SetEncryptionEvent

func (store *StateStore) SetEncryptionEvent(event *event.Event)

func (*StateStore) SetMembership

func (store *StateStore) SetMembership(_ *event.Event)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL