Need help with completion of Cryptography program

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2004
Posts: 37
Reputation: crypter is an unknown quantity at this point 
Solved Threads: 0
crypter's Avatar
crypter crypter is offline Offline
Light Poster

Need help with completion of Cryptography program

 
0
  #1
Jan 7th, 2005
Hi guys im creating this cryptography program. And was wondering how to connect three conditions together.
*Forgot to mention it is in c# language*
I got a place where i can input a key and confirm the key, Those are already linked together when u click the encrypt button it will verify that both text areas are equivalent.
A combobox to choose the type of encryption &
The Encrypt buton to give the order to encrypt

I dont know how to go about and connect everything together. Can someone help me please?

I do have the code for the encryption and the types of encryption and implementation techniques. All i have to do is connect those 3 things together. I could have very well chose for for every one to open in a new form but i dont like the idea.

Anyways, Thanks in advance!
And if you want more info on the code just ask me and ill write back to ya!
Reply With Quote Quick reply to this message  
Join Date: Jul 2003
Posts: 117
Reputation: Iron_Cross is an unknown quantity at this point 
Solved Threads: 2
Iron_Cross's Avatar
Iron_Cross Iron_Cross is offline Offline
Junior Poster

Re: Need help with completion of Cryptography program

 
0
  #2
Jan 13th, 2005
There are several ways to do that, I would go about it this way:

  1. // the encrypt button event handler
  2. encrypt_Click(object sender, EventArgs e)
  3. {
  4. // assuming you've named the text box for the key txtKey and the
  5. // combo box for the encryption type cboEnc do the following
  6. string key = txtKey.Text;
  7. string encType = cboEnc.SelectedItem.ToString();
  8. switch(encType)
  9. {
  10. case "FirstEncryptionType":
  11. // use this encryption;
  12. break;
  13. case "SecondEncryptionType":
  14. // use this encryption
  15. break;
  16. default:
  17. // use the final incryption type
  18. break;
  19. }
  20. }
So maybe I'm not understandin your question properly. But that's how you could do, just use a switch statment to find out which encryption type to use, then do the statements from there.
elitehackers.info
Today's Penny-Arcade!
Pain is weakness leaving the body!
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 37
Reputation: crypter is an unknown quantity at this point 
Solved Threads: 0
crypter's Avatar
crypter crypter is offline Offline
Light Poster

Re: Need help with completion of Cryptography program

 
0
  #3
Jan 14th, 2005
WoW thats great!
Now i was able to add this part of the code in but how would i go about after chosing the encryption type and actually clicking the ENCRYPT button to actually encrypt the file opened... I do have the algorithm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC