
July 15th, 2003, 07:16 PM
|
 |
Doggie
|
|
Join Date: Jul 2003
Location: Seattle, WA
Posts: 751
  
Time spent in forums: 10 h 38 m 25 sec
Reputation Power: 11
|
|
|
How good does the encryption need to be? Here's a fast and dirty one, but not too hard to break if you know what to look for and you have at least one sample of a before and after value:
for each letter in your key, do a binary xor against the corrasponding letter in your input value. If key runs out of characters, start again from the first character. Take end results, convert to Hex (since it can end up being any value)
To reverse, convert hex to string, and xor against your key again.
The only problem with this, is if someone knows both the start and end values, they can xor them against each other to get your key.
I use this method for encrypting files on my HD (without the hex conversion) since no one could possibly know the before value. (even the file name is encrypted)
Last edited by dog135 : July 15th, 2003 at 07:18 PM.
|