![]() |
Xor Encryption - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Programming (https://mirage-engine.uk/forums/forumdisplay.php?fid=24) +----- Forum: Visual Basic 6 (https://mirage-engine.uk/forums/forumdisplay.php?fid=32) +----- Thread: Xor Encryption (/showthread.php?tid=2721) |
Xor Encryption - Nean - 10-04-2009 Can someone please explain this to me? I've been screwing around w/ it, and I managed to get: Code: Private Sub Form_Load() But I still don't really get it. How can Xor be used practically? Etc, etc. Like lets say I wanted to encrypt a password with Xor, how would I do this? Re: Xor Encryption - GIAKEN - 10-04-2009 Code: Public Function Encryption(CodeKey As String, DataIn As String) As String Something like this: To encrypt Encryption("key", "somebodyspassword") To decrypt Encryption("key", Encryption("key", "somebodyspassword")) To explain it better, you encrypt once to encrypt, encrypt twice to decrypt. When the string first goes in, it encrypts it to something like 22dfs432f mixing in some ASCII characters and what-not. If the key is not right when it gets unencrypted, it will still be jumbled up and won't come out the same way it came in. For example saving a password you would have the normal string password, which you encrypt, save it, then when you load you would encrypt again (double encryption = decryption), if the password doesn't match then you know the key for the encryption was wrong or they just got the password wrong. Any questions? I'm trying to explain this. Re: Xor Encryption - Dragoons Master - 10-04-2009 http://en.wikipedia.org/wiki/XOR_cipher Re: Xor Encryption - Nean - 10-04-2009 Thanks for the help guys. I think I can manage this. I just need to look over the function and dissect it so that I can get a better understanding, if I need any more help I'll just post here again. ![]() |