ID:183176
Sep 30 2007, 2:49 pm
|
|
I am trying to create my own encryption by replacing characters with other characters. But after trying Replace() I realized if I were to replace Z with A when I goto replace A it will get changed again. I was wondering is their a way I could Replace text for more than 1 character at a time so i wouldn't have one Z changed to A. My second question is how could I make it so that I can Replace Letter Z with A but when I replace letter A it doesn't get changed to the letter that I replace A with.
|
In response to Soldierman
|
|
Yeah, you will never make something better than what's already there, but it could be fun to try and learn.
And to replace multiple letters, just loop it, and to keep it from replacing more, save the original string and read from that as you replace in a new string. |
In response to Kunark
|
|
Thanks Soilderman and Kunark
|
In response to Upinflames
|
|
So i followed both soilderman and Kunark's instructions to use the Cryptography Microsoft provides. I then created a DLL following one of their demos. I compiled it. Then I try to use it in my application and it says it can't find the procedure. I included the DLL to the project. Here is the code, if it's not to do with code let me know:
using Encryption; For me DLL's never seem to work :/ |
In response to Upinflames
|
|
Haha, you might want to learn about encryption before attempting it. It's nothing like it is on BYOND. Here is my functional encryption/decryption class in C#:
using System; |
In response to Kunark
|
|
Looks to me like you should try to work on more of the basics of C#, before getting involved into more advanced stuff like encryption. Maybe you could get a C# book and work along with it.
|
In response to Soldierman
|
|
I suggest "Mastering Visual C# .NET by Jason Price/Mike Gunderloy". Excellent book. My only gripe about it is that the Security section isn't long enough and it spends too much time trying to teach SQL and XML in later chapters when both would need to be studied well beyond the scope of the book for full understanding.
|
In response to Kunark
|
|
Thanks again everyone, I guess I should get a book. From when I started until now I have only searched the thing on the internet, follow a demo then create my own.
|
http://msdn2.microsoft.com/en-us/library/ system.security.cryptography.aspx