Struct matrix_sdk_crypto::Sas [−][src]
pub struct Sas { /* fields omitted */ }
Expand description
Short authentication string object.
Implementations
Get the user id of the other side.
Get the device id of the other side.
Get the device of the other user.
Get the room id if the verification is happening inside a room.
Does this verification flow support displaying emoji for the short authentication string.
Did this verification flow start from a verification request.
Is this a verification that is veryfying one of our own devices.
Have we confirmed that the short auth string matches.
Has the verification been accepted by both parties.
Get info about the cancellation if the verification flow has been cancelled.
Did we initiate the verification flow.
Accept the SAS verification.
This does nothing if the verification was already accepted, otherwise it
returns an AcceptEventContent
that needs to be sent out.
pub fn accept_with_settings(
&self,
settings: AcceptSettings
) -> Option<OutgoingVerificationRequest>
pub fn accept_with_settings(
&self,
settings: AcceptSettings
) -> Option<OutgoingVerificationRequest>
Accept the SAS verification customizing the accept method.
This does nothing if the verification was already accepted, otherwise it
returns an AcceptEventContent
that needs to be sent out.
Specify a function modifying the attributes of the accept request.
pub async fn confirm(
&self
) -> Result<(Option<OutgoingVerificationRequest>, Option<SignatureUploadRequest>), CryptoStoreError>
pub async fn confirm(
&self
) -> Result<(Option<OutgoingVerificationRequest>, Option<SignatureUploadRequest>), CryptoStoreError>
Confirm the Sas verification.
This confirms that the short auth strings match on both sides.
Does nothing if we’re not in a state where we can confirm the short auth
string, otherwise returns a MacEventContent
that needs to be sent to
the server.
Cancel the verification.
This cancels the verification with the CancelCode::User
.
Returns None if the Sas
object is already in a canceled state,
otherwise it returns a request that needs to be sent out.
Cancel the verification.
This cancels the verification with given CancelCode
.
Note: This method should generally not be used, the cancel()
method should be preferred. The SDK will automatically cancel with the
approprate cancel code, user initiated cancellations should only cancel
with the CancelCode::User
Returns None if the Sas
object is already in a canceled state,
otherwise it returns a request that needs to be sent out.
Are we in a state where we can show the short auth string.
Is the SAS flow canceled.
Get the emoji version of the short auth string.
Returns None if we can’t yet present the short auth string, otherwise seven tuples containing the emoji and description.
Get the index of the emoji representing the short auth string
Returns None if we can’t yet present the short auth string, otherwise seven u8 numbers in the range from 0 to 63 inclusive which can be converted to an emoji using the relevant spec entry.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Sas
impl !UnwindSafe for Sas
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more