pub fn new(
        account: ReadOnlyAccount,
        other_device: ReadOnlyDevice,
        other_identity: Option<UserIdentities>,
    ) -> SasState<Created> {
        let verification_flow_id = Uuid::new_v4().to_string();

        SasState {
            inner: Arc::new(Mutex::new(OlmSas::new())),
            ids: SasIds {
                account,
                other_device,
                other_identity,
            },
            verification_flow_id: Arc::new(verification_flow_id),

            creation_time: Arc::new(Instant::now()),
            last_event_time: Arc::new(Instant::now()),

            state: Arc::new(Created {
                protocol_definitions: MSasV1ContentInit {
                    short_authentication_string: STRINGS.to_vec(),
                    key_agreement_protocols: KEY_AGREEMENT_PROTOCOLS.to_vec(),
                    message_authentication_codes: MACS.to_vec(),
                    hashes: HASHES.to_vec(),
                },
            }),
        }
    }
/// Create a new SAS verification flow.
///
/// # Arguments
///
/// * `account` - Our own account.
///
/// * `other_device` - The other device which we are going to verify.
Create a new SAS verification flow.
Create a new SAS verification flow .
pub fn new(
        account: ReadOnlyAccount,
        other_device: ReadOnlyDevice,
        other_identity: Option<UserIdentities>,
    ) -> SasState<Created> {
        let verification_flow_id = Uuid::new_v4().to_string();
        SasState {
            inner: Arc::new(Mutex::new(OlmSas::new())),
            ids: SasIds {
                account,
                other_device,
                other_identity,
            },
            verification_flow_id: Arc::new(verification_flow_id),
            creation_time: Arc::new(Instant::now()),
            last_event_time: Arc::new(Instant::now()),
            state: Arc::new(Created {
                protocol_definitions: MSasV1ContentInit {
                    short_authentication_string: STRINGS.to_vec(),
                    key_agreement_protocols: KEY_AGREEMENT_PROTOCOLS.to_vec(),
                    message_authentication_codes: MACS.to_vec(),
                    hashes: HASHES.to_vec(),
                },
            }),
        }
    }
pub fn new ( account : ReadOnlyAccount , other_device : ReadOnlyDevice , other_identity : Option < UserIdentities > , ) -> SasState < Created > { let verification_flow_id = Uuid :: new_v4 ( ) . to_string ( ) ; SasState { inner : Arc :: new ( Mutex :: new ( OlmSas :: new ( ) ) ) , ids : SasIds { account , other_device , other_identity , } , verification_flow_id : Arc :: new ( verification_flow_id ) , creation_time : Arc :: new ( Instant :: now ( ) ) , last_event_time : Arc :: new ( Instant :: now ( ) ) , state : Arc :: new ( Created { protocol_definitions : MSasV1ContentInit { short_authentication_string : STRINGS . to_vec ( ) , key_agreement_protocols : KEY_AGREEMENT_PROTOCOLS . to_vec ( ) , message_authentication_codes : MACS . to_vec ( ) , hashes : HASHES . to_vec ( ) , } , } ) , } }
Create a new SAS verification flow.
Create a new SAS verification flow .
account
ReadOnlyAccount
other_device
ReadOnlyDevice
other_identity
Option<UserIdentities>
account
ReadOnlyAccount
other_device
ReadOnlyDevice
other_identity
Option<UserIdentities>