Changeset 1107


Ignore:
Timestamp:
Jan 26, 2010, 1:03:56 PM (12 years ago)
Author:
arnold
Message:

P2PManager and P2PWorker Updates (NAT Traversal after installing certificates possible, etc.)

Location:
trunk
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/PeerToPeerBase/P2PPeer.cs

    r1066 r1107  
    4040        /// dirty workaround!!!
    4141        /// </summary>
    42         private static bool bolFirstInitalisation = true;
     42        private bool bolFirstInitalisation = true;
    4343        private P2PPeerSettings settings;
    4444        private IP2PControl p2pSlave;
     
    211211                this.settings.PeerStatusChanged(P2PPeerSettings.PeerStatus.Connecting);
    212212
     213                this.p2pBase.AllowLoggingToMonitor = this.settings.Log2Monitor;
     214
    213215                this.p2pBase.Initialize(this.settings.P2PPeerName, this.settings.P2PWorldName,
     216                    this.settings.P2PUseNatTraversal,
    214217                    (P2PLinkManagerType)this.settings.P2PLinkMngrType, (P2PBootstrapperType)this.settings.P2PBSType,
    215218                    (P2POverlayType)this.settings.P2POverlType, (P2PDHTType)this.settings.P2PDhtType);
  • trunk/CrypPlugins/PeerToPeerBase/P2PPeerSettings.cs

    r872 r1107  
    4848        #region Start- and Stop-Buttons incl. functionality
    4949
    50         [TaskPane("Start", "Initializes and starts Peer", null, 2, false, DisplayLevel.Beginner, ControlType.Button)]
     50        /** ATTENTION: Change property changeableWhileExecuting to false for the Start and Stop Button.
     51         * Only set to true for testing issues.*/
     52
     53        //[TaskPane("Start", "Initializes and starts Peer", null, 2, false, DisplayLevel.Beginner, ControlType.Button)]
     54        [TaskPane("Start", "Initializes and starts Peer", null, 2, true, DisplayLevel.Beginner, ControlType.Button)]
    5155        public void BtnStart()
    5256        {
     
    6367        }
    6468
    65         [TaskPane("Stop", "Stops the Peer", null, 3, false, DisplayLevel.Beginner, ControlType.Button)]
     69        //[TaskPane("Stop", "Stops the Peer", null, 3, false, DisplayLevel.Beginner, ControlType.Button)]
     70        [TaskPane("Stop", "Stops the Peer", null, 3, true, DisplayLevel.Beginner, ControlType.Button)]
    6671        public void BtnStop()
    6772        {
     
    109114                    this.p2pWorldName = value;
    110115                    OnPropertyChanged("P2PWorldName");
     116                    HasChanges = true;
     117                }
     118            }
     119        }
     120
     121        private bool p2pUseNatTraversal = false;
     122        [TaskPane("Use NAT Traversal", "Activate/Deactivate NAT-Traversal (tunneling connections through NATs " +
     123            "and Firewalls, necessary to work in different networks in the same world)", "P2P Settings", 0, false,
     124            DisplayLevel.Beginner, ControlType.CheckBox)]
     125        public bool P2PUseNatTraversal
     126        {
     127            get { return this.p2pUseNatTraversal; }
     128            set
     129            {
     130                if (value != this.p2pUseNatTraversal)
     131                {
     132                    this.p2pUseNatTraversal = value;
     133                    OnPropertyChanged("P2PUseNatTraversal");
     134                    HasChanges = true;
     135                }
     136            }
     137        }
     138
     139        private bool log2Monitor = true;
     140        [TaskPane("Log2Monitor", "Logs all p2p actions to the PeersAtPlay LogMonitor", "P2P Settings", 1, false,
     141            DisplayLevel.Beginner, ControlType.CheckBox)]
     142        public bool Log2Monitor
     143        {
     144            get { return this.log2Monitor; }
     145            set
     146            {
     147                if (value != this.log2Monitor)
     148                {
     149                    this.log2Monitor = value;
     150                    OnPropertyChanged("Log2Monitor");
    111151                    HasChanges = true;
    112152                }
  • trunk/CrypPlugins/PeerToPeerBase/PeerToPeerBase.cs

    r1098 r1107  
    2020using PeersAtPlay.P2PStorage.DHT;
    2121using PeersAtPlay.P2PStorage.FullMeshDHT;
    22 using PeersAtPlay.P2PLink.SimpleSnalNG;
    2322using PeersAtPlay.P2POverlay.Bootstrapper;
    2423using PeersAtPlay.P2POverlay;
     
    2928using System.Threading;
    3029using Cryptool.PluginBase.Control;
    31 using Cryptool.PluginBase;
    32 using Cryptool.PluginBase.Miscellaneous;
    3330using System.ComponentModel;
    34 using Cryptool.PluginBase.IO;
    3531using PeersAtPlay;
     32using PeersAtPlay.Util.Logging;
    3633
    3734/* - Synchronous functions successfully tested (store, retrieve)
     
    9996        #region Variables
    10097
     98        private bool allowLoggingToMonitor;
     99        /// <summary>
     100        /// If true, all kinds of actions will be logged in the PeersAtPlay LogMonitor.
     101        /// </summary>
     102        public bool AllowLoggingToMonitor
     103        {
     104            get { return this.allowLoggingToMonitor; }
     105            set { this.allowLoggingToMonitor = value; }
     106        }
     107
     108        private const bool ALLOW_LOGGING_TO_MONITOR = true;
     109
    101110        private bool started = false;
    102111        /// <summary>
     
    107116            get { return this.started; }
    108117            private set { this.started = value; }
     118        }
     119
     120        private bool useNatTraversal = true;
     121        /// <summary>
     122        /// Initialization value = true!
     123        /// When you want to use NAT-Traversal (tunneling the P2P
     124        /// connection through NATs and Firewalls), you have to
     125        /// set this flag to true, before initializing this peer
     126        /// ATTENTION: At present you have to install two certificates
     127        /// manually on each workstation, where you want to use P2P@CT2,
     128        /// and set a static PeerName (pap0001) and P2PWorldName (TestBruteforcingWorld)
     129        /// TODO: Automatize the certificate stuff and implement a chance
     130        /// to choose own PeerNames and P2PWorldNames
     131        /// </summary>
     132        public bool UseNatTraversal
     133        {
     134            get { return this.useNatTraversal; }
     135            set { this.useNatTraversal = value; }
    109136        }
    110137
     
    137164        /// </summary>
    138165        /// <param name="sUserName">Choose an individual name for the user</param>
    139         /// <param name="sWorldName">fundamental: two peers are only in the SAME P2P system, when they initialized the SAME WORLD!</param>
     166        /// <param name="sWorldName">fundamental: two peers are only in the SAME
     167        /// P2P system, when they initialized the SAME WORLD!</param>
     168        /// <param name="bolUseNatTraversal">When you want to use NAT-Traversal #
     169        /// (tunneling the P2P connection through NATs and Firewalls), you have to
     170        /// set this flag to true</param>
    140171        /// <param name="linkManagerType"></param>
    141172        /// <param name="bsType"></param>
    142173        /// <param name="overlayType"></param>
    143174        /// <param name="dhtType"></param>
    144         public void Initialize(string sUserName, string sWorldName, P2PLinkManagerType linkManagerType, P2PBootstrapperType bsType, P2POverlayType overlayType, P2PDHTType dhtType)
    145         {
     175        public void Initialize(string sUserName, string sWorldName, bool bolUseNatTraversal, P2PLinkManagerType linkManagerType, P2PBootstrapperType bsType, P2POverlayType overlayType, P2PDHTType dhtType)
     176        {
     177            this.UseNatTraversal = bolUseNatTraversal;
     178
    146179            #region Setting LinkManager, Bootstrapper, Overlay and DHT to the specified types
    147180            switch (linkManagerType)
     
    149182                case P2PLinkManagerType.Snal:
    150183                    //snal = secure network abstraction layer
    151                     this.linkmanager = new Snal();
     184                    if (UseNatTraversal)
     185                    {
     186                        if (bsType == P2PBootstrapperType.LocalMachineBootstrapper)
     187                            throw (new Exception("It's mindless to activate NAT traversal, but use the LocalMachineBootstrapper."));
     188
     189                        LogToMonitor("Init LinkMgr: Using NAT Traversal stuff");
     190                        // NAT-Traversal stuff needs a different Snal-Version
     191                        this.linkmanager = new PeersAtPlay.P2PLink.SnalNG.Snal();
     192
     193                        ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.ConnectInternal = false;
     194                        ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.LocalReceivingPort = 0;
     195                        ((PeersAtPlay.P2PLink.SnalNG.Snal)this.linkmanager).Settings.UseLocalAddressDetection = false;
     196                    }
     197                    else
     198                    {
     199                        this.linkmanager = new PeersAtPlay.P2PLink.SimpleSnalNG.Snal();
     200                    }
    152201                    break;
    153202                default:
     
    161210                    break;
    162211                case P2PBootstrapperType.IrcBootstrapper:
     212                    if (UseNatTraversal)
     213                    {
     214                        LogToMonitor("Init Bootstrapper: Using NAT Traversal stuff");
     215                        PeersAtPlay.P2POverlay.Bootstrapper.IrcBootstrapper.Settings.DelaySymmetricResponse = true;
     216                        PeersAtPlay.P2POverlay.Bootstrapper.IrcBootstrapper.Settings.IncludeSymmetricInResponse = false;
     217                        PeersAtPlay.P2POverlay.Bootstrapper.IrcBootstrapper.Settings.SymmetricResponseDelay = 6000;
     218                    }
     219                    else
     220                    {
     221                        PeersAtPlay.P2POverlay.Bootstrapper.IrcBootstrapper.Settings.IncludeSymmetricInResponse = true;
     222                        PeersAtPlay.P2POverlay.Bootstrapper.IrcBootstrapper.Settings.DelaySymmetricResponse = false;
     223                    }
    163224                    this.bootstrapper = new IrcBootstrapper();
    164225                    break;
     
    275336        public PeerId GetPeerID(byte[] byteId)
    276337        {
     338            LogToMonitor("GetPeerID: Converting byte[] to PeerId-Object");
    277339            return new PeerId(this.overlay.GetAddress(byteId));
    278340        }
     
    298360            {
    299361                PeerId pid = new PeerId(e.Message.Source);
    300                 OnP2PMessageReceived(pid, e.Message.Data.PopBytes(e.Message.Data.CurrentStackSize));
     362                /* You have to fire this event asynchronous, because the main
     363                 * thread will be stopped in this wrapper class for synchronizing
     364                 * the asynchronous stuff (AutoResetEvent) --> so this could run
     365                 * into a deadlock, when you fire this event synchronous (normal Invoke)
     366                 * ATTENTION: This could change the invocation order!!! In my case
     367                              no problem, but maybe in future cases... */
     368                OnP2PMessageReceived.BeginInvoke(pid, e.Message.Data.PopBytes(e.Message.Data.CurrentStackSize),null,null);
    301369                //OnP2PMessageReceived(pid, e.Message.Data.PopUTF8String());
    302370            }
     
    321389            this.systemLeft.Set();
    322390            Started = false;
     391
     392            LogToMonitor("OnDHT_SystemLeft has nulled the dht and setted the systemLeft Waithandle");
    323393        }
    324394
     
    404474        public bool SynchStore(string sKey, byte[] byteData)
    405475        {
     476            LogToMonitor("Begin: SynchStore. Key: " + sKey + ", Data: " + Encoding.UTF8.GetString(byteData));
    406477            AutoResetEvent are = new AutoResetEvent(false);
    407478            // this method returns always a GUID to distinguish between asynchronous actions
    408479            Guid g = this.dht.Store(OnSynchStoreCompleted, sKey, byteData);
    409             //Guid g = this.dht.Store(OnSynchStoreCompleted, sKey, byteData, IGNORE_DHT_VERSIONING_SYSTEM);
    410480
    411481            ResponseWait rw = new ResponseWait() { WaitHandle = are, key=sKey , value = byteData };
     
    414484            //blocking till response
    415485            are.WaitOne();
     486
     487            LogToMonitor("End: SynchStore. Key: " + sKey + ". Success: " + rw.success.ToString());
     488
    416489            return rw.success;
    417490        }
     
    502575        public byte[] SynchRetrieve(string sKey)
    503576        {
     577            LogToMonitor("ThreadId (P2PBase SynchRetrieve): " + Thread.CurrentThread.ManagedThreadId.ToString());
     578
    504579            AutoResetEvent are = new AutoResetEvent(false);
    505580            // this method returns always a GUID to distinguish between asynchronous actions
     581
     582            LogToMonitor("Begin: SynchRetrieve. Key: " + sKey);
     583             
    506584            Guid g = this.dht.Retrieve(OnSynchRetrieveCompleted, sKey);
    507585           
     
    511589            // blocking till response
    512590            are.WaitOne();
     591
     592            LogToMonitor("End: SynchRetrieve. Key: " + sKey + ". Success: " + rw.success.ToString());
     593
    513594            //Rückgabe der Daten
    514595            return rw.Message;
     
    521602        private void OnSynchRetrieveCompleted(RetrieveResult rr)
    522603        {
     604            LogToMonitor(rr.Guid.ToString());
     605           
    523606            ResponseWait rw;
     607
     608            LogToMonitor("ThreadId (P2PBase retrieve callback): " + Thread.CurrentThread.ManagedThreadId.ToString());
    524609
    525610            if (this.waitDict.TryGetValue(rr.Guid, out rw))
     
    550635        public bool SynchRemove(string sKey)
    551636        {
     637            LogToMonitor("Begin SynchRemove. Key: " + sKey);
     638
    552639            AutoResetEvent are = new AutoResetEvent(false);
    553640            // this method returns always a GUID to distinguish between asynchronous actions
     
    560647            // blocking till response
    561648            are.WaitOne();
     649
     650            LogToMonitor("Ended SynchRemove. Key: " + sKey + ". Success: " + rw.success.ToString());
     651
    562652            return rw.success;
    563653        }
     
    598688            }
    599689        }
     690
     691        public void LogToMonitor(string sTextToLog)
     692        {
     693            if(AllowLoggingToMonitor)
     694                Log.Debug(sTextToLog);
     695        }
     696
    600697    }
    601698
  • trunk/CrypPlugins/PeerToPeerPublisher/P2PPublisher.cs

    r1068 r1107  
    8787                this.p2pPublisher.Stop(PubSubMessageType.Solution);
    8888                GuiLogMessage("TEST: Emulate Solution-Found-message", NotificationLevel.Info);
     89            }
     90            if (e.PropertyName == "BtnSerDeser")
     91            {
     92                this.p2pPublisher.TestSerialization();
    8993            }
    9094        }
  • trunk/CrypPlugins/PeerToPeerPublisher/P2PPublisherBase.cs

    r1098 r1107  
    66using Cryptool.PluginBase.Control;
    77using System.Threading;
     8using System.IO;
    89
    910/*
     
    2627        private Timer timerWaitingForAliveMsg;
    2728        private PeerId ownPeerId;
     29        /// <summary>
     30        /// interval in milliseconds!!! Divide with 1000 to preserve seconds
     31        /// </summary>
    2832        private long aliveMessageInterval;
    2933
     
    204208            } // end switch
    205209            if (timerWaitingForAliveMsg == null)
    206                 timerWaitingForAliveMsg = new Timer(OnWaitingForAliveMsg, null, this.aliveMessageInterval * 1000,
    207                     this.aliveMessageInterval * 1000);
     210                timerWaitingForAliveMsg = new Timer(OnWaitingForAliveMsg, null, this.aliveMessageInterval,
     211                    this.aliveMessageInterval);
    208212
    209213            if (msgType != PubSubMessageType.Unregister)
     
    271275
    272276        #endregion
     277
     278        // Only for testing the (De-)Serialization of SubscribersManagement
     279        public void TestSerialization()
     280        {
     281            /* Get all Subs and serialize them manual */
     282            List<PeerId> originalSubList = this.peerManagement.GetAllSubscribers();
     283
     284            /* Serialize and deserialize active subs automatically */
     285            byte[] byResult = this.peerManagement.Serialize();
     286            List<PeerId> pid = this.peerManagement.Deserialize(byResult, ref this.p2pControl);
     287
     288            /* Comparing the deserialized list with the original SubList */
     289            bool result = true;
     290
     291            if (pid.Count != originalSubList.Count)
     292            {
     293                result = false;
     294            }
     295            else
     296            {
     297                int f = 0;
     298                foreach (PeerId originalPeer in originalSubList)
     299                {
     300                    if (originalPeer != pid[f])
     301                    {
     302                        result = false;
     303                        break;
     304                    }
     305                    f++;
     306                }
     307            }
     308            GuiLogging("Result of serialization/deserialization: " + result, NotificationLevel.Debug);
     309        }
    273310    }
    274311}
  • trunk/CrypPlugins/PeerToPeerPublisher/P2PPublisherSettings.cs

    r1068 r1107  
    8585            OnPropertyChanged("BtnSolutionFound");
    8686        }
     87
     88        [TaskPane("Ser/Deser Test", "Click here to test serialization/deserialization of PeerManagementList!", "Serialization Test", 0, true, DisplayLevel.Beginner, ControlType.Button)]
     89        public void BtnSerDeser()
     90        {
     91            OnPropertyChanged("BtnSerDeser");
     92        }
    8793        /* FOR TESTING ISSUES */
    8894
  • trunk/CrypPlugins/PeerToPeerPublisher/SubscribersManagement.cs

    r1098 r1107  
    44using System.Text;
    55using System.Collections;
     6using System.IO;
     7using Cryptool.PluginBase.Control;
    68
    79namespace Cryptool.Plugins.PeerToPeer
     
    2830        /// <summary>
    2931        /// Timespan in which subscriber gets marked secondChance first and twice is removed from Subscriber list.
    30         /// Latency of 2 seconds will be added because of network latency.
     32        /// Latency of 3 seconds will be added because of network latency.
    3133        /// </summary>
    3234        public long ExpirationTime
    3335        {
    34             get { return this.expirationTime * 2000;  }
     36            get { return this.expirationTime + 3000;  }
    3537            set { this.expirationTime = value; }
    3638        }
     
    162164            this.secondChanceList = null;
    163165        }
     166
     167        private Encoding enc = Encoding.UTF8;
     168        /// <summary>
     169        /// serializes only the active subscribers list,
     170        /// either the second chance list or the timestamps
     171        /// are nonrelevant, because after Deserializing
     172        /// this stuff, the availablity is obsolete and have
     173        /// to be additionally checked
     174        /// </summary>
     175        /// <returns></returns>
     176        public virtual byte[] Serialize()
     177        {
     178            byte[] ret = null;
     179            lock (this.checkList)
     180            {
     181                if (this.checkList == null || this.checkList.Count == 0)
     182                {
     183                    return null;
     184                }
     185                List<PeerId> lstActivePeers = this.checkList.Keys.ToList<PeerId>();
     186                using (MemoryStream memStream = new MemoryStream())
     187                {
     188                    // first write dataset count to list
     189                    memStream.WriteByte(Convert.ToByte(lstActivePeers.Count));
     190                    // than write every peer id as an byte array - first byte is the length of the id
     191                    foreach (PeerId pid in lstActivePeers)
     192                    {
     193                        byte[] byPid = pid.ToByteArray();
     194                        byte[] enhancedByte = new byte[byPid.Length + 1];
     195                        //additional store PeerId length to ease reconstructing
     196                        enhancedByte[0] = Convert.ToByte(byPid.Length);
     197                        Buffer.BlockCopy(byPid, 0, enhancedByte, 1, byPid.Length);
     198                        memStream.Write(enhancedByte, 0, enhancedByte.Length);
     199                    }
     200                    ret = memStream.ToArray();
     201                }
     202            }
     203            return ret;
     204        }
     205
     206        /// <summary>
     207        /// Deserializes a Subscriber/Worker list and reconstructs the PeerIds. Returns
     208        /// the deserialized PeerId, so you can ping the peers to check whether they are
     209        /// available anymore.
     210        /// </summary>
     211        /// <param name="serializedPeerIds">the already serialized peerId byte-array</param>
     212        /// <param name="p2pControl">a reference to the p2pControl to convert deserialized byte arrays to valid PeerIds</param>
     213        /// <returns></returns>
     214        public virtual List<PeerId> Deserialize(byte[] serializedPeerIds, ref IP2PControl p2pControl)
     215        {
     216            if (serializedPeerIds == null || serializedPeerIds.Length < 2)
     217            {
     218                throw (new Exception("Invalid byte[] input - deserialization not possible"));
     219            }
     220            List<PeerId> deserializedPeers = new List<PeerId>();
     221
     222            MemoryStream memStream = new MemoryStream(serializedPeerIds);
     223            try
     224            {
     225                int peerIdAmount = Convert.ToInt32(memStream.ReadByte());
     226                int peerIdLen, readResult;
     227                PeerId pid;
     228                for (int i = 0; i < peerIdAmount; i++)
     229                {
     230                    peerIdLen = Convert.ToInt32(memStream.ReadByte());
     231                    byte[] byPeerId = new byte[peerIdLen];
     232                    readResult = memStream.Read(byPeerId, 0, byPeerId.Length);
     233                    if (readResult == 0)
     234                        throw (new Exception("Deserialization process of the byte[] was canceled, because byte[] didn't achieve to the conventions."));
     235                    // create a new PeerId Object and add it to the list
     236                    pid = p2pControl.GetPeerID(byPeerId);
     237                    //deserializedPeers.Add(byPeerId);
     238                    deserializedPeers.Add(pid);
     239                }
     240            }
     241            catch (Exception ex)
     242            {
     243                memStream.Flush();
     244                memStream.Close();
     245                memStream.Dispose();
     246                deserializedPeers.Clear();
     247                deserializedPeers = null;
     248                throw new Exception("Deserialization process of byte[] was canceled, because byte[] didn't achieve to the conventions.", ex);
     249            }
     250            return deserializedPeers;
     251        }
    164252    }
    165253}
  • trunk/CrypPlugins/PeerToPeerWorker/P2PWorkerBase.cs

    r1100 r1107  
    77using System.Threading;
    88using KeySearcher;
     9using System.IO;
    910
    1011/* Nice to have:
     
    2930    public class P2PWorkerBase : P2PSubscriberBase
    3031    {
     32        //Arnie 2010.01.26 - delete after running the DES Bruteforcing test
     33        StreamWriter debugFile;
     34        DateTime startProcessingTime;
     35
     36
     37
    3138        #region events and variables
    3239
     
    7279            : base(p2pControl)
    7380        {
     81            //Arnie 2010.01.26 - delete after running the DES Bruteforcing test
     82            string sPath = @"c:\p2p_debug";
     83            if (!Directory.Exists(sPath))
     84                Directory.CreateDirectory(sPath);
     85            debugFile = new FileInfo(sPath + @"\wkr_debug.txt").CreateText();
     86            startProcessingTime = new DateTime();
     87
     88
    7489            this.sTopicName = sTopicName;
    7590            this.keySearcherControl = keySearcherControl;
     
    151166                else
    152167                {
    153                     Thread processingThread = new Thread(new ParameterizedThreadStart(this.StartProcessing));
    154                     processingThread.Start(receivedKeyPattern);
    155                     //StartProcessing(receivedKeyPattern);
     168                    //Thread processingThread = new Thread(new ParameterizedThreadStart(this.StartProcessing));
     169                    //processingThread.Start(receivedKeyPattern);
     170                    GuiLogging("ThreadId (HandleIncomingBums): " + Thread.CurrentThread.ManagedThreadId.ToString(),NotificationLevel.Debug);
     171                    StartProcessing(receivedKeyPattern);
    156172                }
    157173            }
     
    175191        private void StartProcessing(KeyPattern receivedKeyPattern)
    176192        {
     193            GuiLogging("ThreadId (Start Processing): " + Thread.CurrentThread.ManagedThreadId.ToString(), NotificationLevel.Debug);
     194
    177195            GuiLogging("Start Bruteforcing the incoming Key: '" + receivedKeyPattern.getKey() + "', WildCardKey: '" + receivedKeyPattern.WildcardKey + "'", NotificationLevel.Info);
    178196
     
    183201            this.actualProcessingPattern = receivedKeyPattern;
    184202
     203
     204            //Arnie 2010.01.26 - delete after running the DES Bruteforcing test
     205            startProcessingTime = DateTime.Now;
     206            debugFile.WriteLine("BEGIN Date: " + startProcessingTime.ToString() + "\tKey: " + receivedKeyPattern.getKey());
     207
     208
    185209            /* Begin: New stuff because of changing the IControl data flow - Arnie 2010.01.18 */
    186210
     
    200224            if (top10List != null)
    201225            {
     226                //Arnie 2010.01.26 - delete after running the DES Bruteforcing test
     227                DateTime endProcessingTime = DateTime.Now;
     228                TimeSpan commonProcessingTime = endProcessingTime.Subtract(startProcessingTime);
     229                debugFile.WriteLine("ENDED HH.MM.ss:mm " + commonProcessingTime.Hours + "." + commonProcessingTime.Minutes + "." + commonProcessingTime.Seconds + ":" + commonProcessingTime.Milliseconds);
     230
     231
    202232                KeySearcher.KeySearcher.ValueKey bestResult = top10List.First<KeySearcher.KeySearcher.ValueKey>();
    203233                GuiLogging("Bruteforcing Ended. Best key result: '" + bestResult.key + "'. Coefficient value: "
Note: See TracChangeset for help on using the changeset viewer.