How do I encrypt/decrypt a file using the Caesar shift in C#.NET 2008
The Caesar encryption of a file in C#.NET 2008
Page 1 of 12 Replies - 1405 Views - Last Post: 06 September 2010 - 08:30 AM
Replies To: The Caesar encryption of a file in C#.NET 2008
#2
Re: The Caesar encryption of a file in C#.NET 2008
Posted 06 September 2010 - 08:21 AM
A very simple way to do it would be to create a Dictionary<char,char>() and have each letter represent another letter. The Key would be the encrypted character, the Value would be the actual letter being encrypted. Then you could just use that dictionary:
The convert method above would be:
NOT TESTED. But you get the idea.
public char Convert(char character)
{
return CaesarConverter.Convert(character);
}
The convert method above would be:
return MyDictionary[character];
NOT TESTED. But you get the idea.
#3
Re: The Caesar encryption of a file in C#.NET 2008
Posted 06 September 2010 - 08:30 AM
``
Thanks, Sergio!
Thanks, Sergio!
This post has been edited by JackOfAllTrades: 06 September 2010 - 08:40 AM
Reason for edit:: Removed unnecessary quote
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|