Ejemplo n.º 1
0
        private void CloseOTRSession(string session_closed_message)
        {
            DebugPrint("Ending OTR session");

            _otr_event_args = new OTREventArgs();
            _otr_event_args.SetMessage(session_closed_message);
            _otr_event_args.SetOTREvent(OTR_EVENT.CLOSED);
            DoOTREvent(_otr_event_args);

            _message_state = OTR_MESSAGE_STATE.MSG_STATE_PLAINTEXT;
            _message_manager = null;
            _ake_keys_manager = null;
            _dsa_signer = null;
            _signature_manager = null;
            _smp_manager = null;
            _ake_keys = null;
            _my_unique_id = string.Empty;
            _my_buddy_unique_id = string.Empty;
            _otr_fragment_object = null;
            EndSMPSession();
        }
Ejemplo n.º 2
0
        private void EndSMPSession()
        {
            if (_smp_manager != null)
            {
                _smp_manager.SMPEnd();
                _smp_manager = null;

                DebugPrint("Ending SMP session");

                if (_stop_watch != null)
                {
                    _stop_watch.Stop();
                    string ExecutionTimeTaken = string.Format("{0} Minute(s)  {1} Second(s)   {2} Mili seconds",
                    _stop_watch.Elapsed.Minutes, _stop_watch.Elapsed.Seconds, _stop_watch.Elapsed.TotalMilliseconds);

                    DebugPrint("SMP Execution time: " + ExecutionTimeTaken);

                    _stop_watch = null;

                }

            }
        }
Ejemplo n.º 3
0
        private void StartSMPSession(bool is_initiator)
        {
            if (_smp_manager == null)
            {
                _stop_watch = new Stopwatch();
                _stop_watch.Start();

                _smp_manager = new SMPManager();
                _smp_manager.SMPStart(GetSMPSecret(is_initiator));
                DebugPrint("Starting SMP session");
            }
        }