Click here to Skip to main content
15,917,456 members
Home / Discussions / C#
   

C#

 
GeneralI want to write a simple C# compiler Pin
Fired.Fish.Gmail2-Feb-10 21:52
Fired.Fish.Gmail2-Feb-10 21:52 
AnswerRe: I want to write a simple C# compiler Pin
Nuri Ismail2-Feb-10 22:07
Nuri Ismail2-Feb-10 22:07 
GeneralRe: I want to write a simple C# compiler Pin
Fired.Fish.Gmail3-Feb-10 0:50
Fired.Fish.Gmail3-Feb-10 0:50 
GeneralRe: I want to write a simple C# compiler Pin
harold aptroot3-Feb-10 1:43
harold aptroot3-Feb-10 1:43 
GeneralRe: I want to write a simple C# compiler Pin
Fired.Fish.Gmail4-Feb-10 18:11
Fired.Fish.Gmail4-Feb-10 18:11 
GeneralRe: I want to write a simple C# compiler Pin
harold aptroot5-Feb-10 3:28
harold aptroot5-Feb-10 3:28 
Questionc# forms property Pin
ric_c+programer2-Feb-10 20:29
ric_c+programer2-Feb-10 20:29 
AnswerRe: c# forms property Pin
Calla2-Feb-10 21:25
Calla2-Feb-10 21:25 
QuestionGUI automation? Pin
Tridip Bhattacharjee2-Feb-10 19:51
professionalTridip Bhattacharjee2-Feb-10 19:51 
AnswerRe: GUI automation? Pin
Eddy Vluggen2-Feb-10 22:33
professionalEddy Vluggen2-Feb-10 22:33 
QuestionGenerate a key press Pin
DoanDucTai2-Feb-10 19:39
DoanDucTai2-Feb-10 19:39 
AnswerRe: Generate a key press [modified] Pin
Nuri Ismail2-Feb-10 21:27
Nuri Ismail2-Feb-10 21:27 
AnswerRe: Generate a key press Pin
Giorgi Dalakishvili2-Feb-10 23:10
mentorGiorgi Dalakishvili2-Feb-10 23:10 
Questionmultithreading problem Pin
Member 5903102-Feb-10 19:33
Member 5903102-Feb-10 19:33 
AnswerRe: multithreading problem Pin
Calla2-Feb-10 20:23
Calla2-Feb-10 20:23 
AnswerRe: multithreading problem Pin
Luc Pattyn3-Feb-10 1:42
sitebuilderLuc Pattyn3-Feb-10 1:42 
QuestionHow to identify the application has been executed or not? Pin
BalasubramanianK2-Feb-10 19:22
BalasubramanianK2-Feb-10 19:22 
AnswerRe: How to identify the application has been executed or not? Pin
BalasubramanianK2-Feb-10 19:40
BalasubramanianK2-Feb-10 19:40 
Questiongdiplus jpeg encodng performance? Pin
Druuler2-Feb-10 17:29
Druuler2-Feb-10 17:29 
QuestionA good looking TreeView Pin
newstargate2-Feb-10 11:15
newstargate2-Feb-10 11:15 
AnswerRe: A good looking TreeView Pin
Super Lloyd2-Feb-10 11:28
Super Lloyd2-Feb-10 11:28 
AnswerRe: A good looking TreeView Pin
Anurag Gandhi2-Feb-10 19:23
professionalAnurag Gandhi2-Feb-10 19:23 
JokeRe: A good looking TreeView Pin
Ravi Bhavnani3-Feb-10 2:06
professionalRavi Bhavnani3-Feb-10 2:06 
QuestionDecryption algorithm Pin
3bood.ghzawi2-Feb-10 9:34
3bood.ghzawi2-Feb-10 9:34 
Hi all, as runing this algorithm, that decrypt an encrypted array of bytes, allways returns null as a decrypted result...

the code is below:

public static void Decrypt(byte[] toEncryptArray, bool useHashing)
        {
            System.Configuration.AppSettingsReader settingsReader = new AppSettingsReader();
            //Get your key from config file to open the lock!
            string key = (string)settingsReader.GetValue("SecurityKey", typeof(String));

            if (useHashing)
            {
                MD5CryptoServiceProvider hashmd5 = new MD5CryptoServiceProvider();
                D_keyArray = hashmd5.ComputeHash(UTF8Encoding.UTF8.GetBytes(key));
                hashmd5.Clear();
            }
            else
                D_keyArray = UTF8Encoding.UTF8.GetBytes(key);

            TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider();
            tdes.Key = D_keyArray;
            tdes.Mode = CipherMode.ECB;
            tdes.Padding = PaddingMode.PKCS7;

            ICryptoTransform cTransform = tdes.CreateDecryptor();
            byte[] D_resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
           
             //  the D_resultArray always get a null value
            tdes.Clear();
       }


Can any one help me ,,,,,,,,, i'll be very thanks..,

regards Big Grin | :-D
AnswerMessage Closed Pin
2-Feb-10 9:56
stancrm2-Feb-10 9:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.