Ignore:
Timestamp:
Nov 14, 2010, 6:03:32 PM (11 years ago)
Author:
Sven Rech
Message:

keysearcher opencl fix

File:
1 edited

Legend:

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

    r2086 r2087  
    1414        private IControlCost controlCost;
    1515        private IControlEncryption encryptionController;
    16         private int bruteforceBlock;
     16        private int maxKeys;
    1717
    1818        private IKeyTranslator keyTranslatorOfCode = null;
     
    2020        private Kernel openCLKernel = null;
    2121
    22         public KeySearcherOpenCLCode(byte[] encryptedData, IControlEncryption encryptionController, IControlCost controlCost, int bruteforceBlock)
     22        public KeySearcherOpenCLCode(byte[] encryptedData, IControlEncryption encryptionController, IControlCost controlCost, int maxKeys)
    2323        {
    2424            this.encryptedData = encryptedData;
    2525            this.encryptionController = encryptionController;
    2626            this.controlCost = controlCost;
    27             this.bruteforceBlock = bruteforceBlock;
     27            this.maxKeys = maxKeys;
    2828        }
    2929
     
    5757
    5858            //put key movement of pattern into code:
    59             code = keyTranslator.ModifyOpenCLCode(code, bruteforceBlock);
     59            code = keyTranslator.ModifyOpenCLCode(code, maxKeys);
    6060
    6161            keyTranslatorOfCode = keyTranslator;
    6262            this.openCLCode = code;
    6363
    64             ////Test:
    65             //System.IO.TextWriter tw = new System.IO.StreamWriter(@"C:\Users\sven\Test\test.txt");
    66             //tw.Write(code);
    67             //tw.Close();
     64            //Test:
     65            System.IO.TextWriter tw = new System.IO.StreamWriter(@"C:\Users\sven\Test\test.txt");
     66            tw.Write(code);
     67            tw.Close();
    6868
    6969            return code;
     
    8989            }
    9090        }
    91 
    92         public int GetBruteforceBlock()
    93         {
    94             return bruteforceBlock;
    95         }
    9691    }
    9792}
Note: See TracChangeset for help on using the changeset viewer.