I have a string, lets say \"123|ABC|test|12345|FF\" and I want to xor the ascii value of each character and print the result in hex.
What is the simplest way?
Found it...
lrc = 0 input.each_byte do | c | lrc ^= c end hexVal = lrc.to_s(16)