Alex-

Sunday, April 30, 2006, 3:20:37 AM, you wrote:

> Just do the same thing again .... xor "reverses" itself

Yes - I love xor.

function EncodeOrDecode pString, pKey
  local tNewStr

  repeat for each char c in pString
    put numToChar((charToNum(c)) bitXor pKey) after tNewStr
  end repeat
  return tNewStr
end EncodeOrDecode

...and you can see if it works by

put EncodeOrDecode(EncodeOrDecode("somestring", 90),90) is "somestring"

Back in the Jurassic mists when I was first learning about assembly
language I fell in love with xor. It's still my favorite opcode.

-- 
-Mark Wieder
 [EMAIL PROTECTED]

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to