944,183 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 3549
  • ASP.NET RSS
Jan 7th, 2005
0

Need help with completion of Cryptography program

Expand Post »
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!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
crypter is offline Offline
37 posts
since Jul 2004
Jan 13th, 2005
0

Re: Need help with completion of Cryptography program

There are several ways to do that, I would go about it this way:

ASP.NET Syntax (Toggle Plain Text)
  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.
Reputation Points: 46
Solved Threads: 2
Junior Poster
Iron_Cross is offline Offline
117 posts
since Jul 2003
Jan 14th, 2005
0

Re: Need help with completion of Cryptography program

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.
Reputation Points: 10
Solved Threads: 0
Light Poster
crypter is offline Offline
37 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Getting Garbage data while using asp.net and oracle 8i 1.5
Next Thread in ASP.NET Forum Timeline: Page hangs or displays connection pooling max size error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC