Ignore:
Timestamp:
Mar 17, 2010, 12:35:57 PM (12 years ago)
Author:
arnold
Message:

For evaluation issues added a DateTime information to every LogMessage from P2P- and KeySearcher-PlugIns, because the LogMessages seems to be inaccurate and/or delayed in some cases

Additionally added a Begin- and End-Message into the KeySearcher with an TimeSpan information, how long the bruteforce process had taken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/KeySearcher/KeySearcher.cs

    r1216 r1244  
    539539        private LinkedList<ValueKey> bruteforcePattern(KeyPattern pattern, IControlEncryption sender)
    540540        {
     541            //For evaluation issues - added by Arnold 2010.03.17
     542            DateTime beginBruteforcing = DateTime.Now;
     543            GuiLogMessage("Start bruteforcing pattern '" + pattern.getKey() + "'", NotificationLevel.Debug);
     544
     545
     546                       
    541547            int maxInList = 10;
    542548            LinkedList<ValueKey> costList = new LinkedList<ValueKey>();
     
    634640                ProgressChanged(1, 1);
    635641
     642            /* BEGIN: For evaluation issues - added by Arnold 2010.03.17 */
     643            TimeSpan bruteforcingTime = DateTime.Now.Subtract(beginBruteforcing);
     644            StringBuilder sbBFTime = new StringBuilder();
     645            if (bruteforcingTime.Days > 0)
     646                sbBFTime.Append(bruteforcingTime.Days.ToString() + " days ");
     647            if (bruteforcingTime.Hours > 0)
     648            {
     649                if (bruteforcingTime.Hours <= 9)
     650                    sbBFTime.Append("0");
     651                sbBFTime.Append(bruteforcingTime.Hours.ToString() + ":");
     652            }
     653            if (bruteforcingTime.Minutes <= 9)
     654                sbBFTime.Append("0");
     655            sbBFTime.Append(bruteforcingTime.Minutes.ToString() + ":");
     656            if (bruteforcingTime.Seconds <= 9)
     657                sbBFTime.Append("0");
     658            sbBFTime.Append(bruteforcingTime.Seconds.ToString() + "-");
     659            if (bruteforcingTime.Milliseconds <= 9)
     660                sbBFTime.Append("00");
     661            if (bruteforcingTime.Milliseconds <= 99)
     662                sbBFTime.Append("0");
     663            sbBFTime.Append(bruteforcingTime.Milliseconds.ToString());
     664
     665            GuiLogMessage("Ended bruteforcing pattern '" + pattern.getKey() + "'. Bruteforcing TimeSpan: " + sbBFTime.ToString(), NotificationLevel.Debug);
     666            /* END: For evaluation issues - added by Arnold 2010.03.17 */
     667
    636668            return costList;
    637669        }
Note: See TracChangeset for help on using the changeset viewer.