Versions in this module Expand all Collapse all v0 v0.18.3 May 21, 2024 v0.18.1 May 21, 2024 Changes in this version + var ErrInvalidQRCodeHeader = errors.New("invalid QR code header") + var ErrInvalidQRCodeMode = errors.New("invalid QR code mode") + var ErrUnknownQRCodeVersion = errors.New("invalid QR code version") + func BrokenB64Encode(input []byte) string + type QRCode struct + Key1 [32]byte + Key2 [32]byte + Mode QRCodeMode + SharedSecret []byte + TransactionID id.VerificationTransactionID + func NewQRCode(mode QRCodeMode, txnID id.VerificationTransactionID, key1, key2 [32]byte) *QRCode + func NewQRCodeFromBytes(data []byte) (*QRCode, error) + func (q *QRCode) Bytes() []byte + type QRCodeMode byte + const QRCodeModeCrossSigning + const QRCodeModeSelfVerifyingMasterKeyTrusted + const QRCodeModeSelfVerifyingMasterKeyUntrusted + type RequiredCallbacks interface + VerificationCancelled func(ctx context.Context, txnID id.VerificationTransactionID, ...) + VerificationDone func(ctx context.Context, txnID id.VerificationTransactionID) + VerificationRequested func(ctx context.Context, txnID id.VerificationTransactionID, from id.UserID) + type VerificationHelper struct + func NewVerificationHelper(client *mautrix.Client, mach *crypto.OlmMachine, callbacks any, ...) *VerificationHelper + func (vh *VerificationHelper) AcceptVerification(ctx context.Context, txnID id.VerificationTransactionID) error + func (vh *VerificationHelper) CancelVerification(ctx context.Context, txnID id.VerificationTransactionID, ...) error + func (vh *VerificationHelper) ConfirmQRCodeScanned(ctx context.Context, txnID id.VerificationTransactionID) error + func (vh *VerificationHelper) ConfirmSAS(ctx context.Context, txnID id.VerificationTransactionID) error + func (vh *VerificationHelper) HandleScannedQRData(ctx context.Context, data []byte) error + func (vh *VerificationHelper) Init(ctx context.Context) error + func (vh *VerificationHelper) StartInRoomVerification(ctx context.Context, roomID id.RoomID, to id.UserID) (id.VerificationTransactionID, error) + func (vh *VerificationHelper) StartSAS(ctx context.Context, txnID id.VerificationTransactionID) error + func (vh *VerificationHelper) StartVerification(ctx context.Context, to id.UserID) (id.VerificationTransactionID, error)