title: How to XOR two hex strings so that each byte is XORed separately?
body: <p>I have been posting similar questions here for a couple of days now, but it seems like I was not asking the right thing, so excuse me if I have exhausted you with my XOR questions :D.</p>
  
  <p>To the point - I have two hex strings and I want to XOR these strings such that each byte is XORed separately (i.e. each pair of numbers is XORed separately). And I want to do this in python, and I want to be able to have strings of different lengths. I will do an example manually to illustrate my point (I used the code environment because it allows me to put in spaces where I want them to be):</p>
  
  <pre><code>Input:
  s1 = "48656c6c6f"
  s2 = "61736b"
  
  Encoding in binary:
  48 65 6c 6c 6f = 01001000 01100101 01101100 01101100 01101111
  61 73 6b       = 01100001 01110011 01101011
  
  XORing the strings:
  01001000 01100101 01101100 01101100 01101111
                    01100001 01110011 01101011
                    00001101 00011111 00000100
  
  Converting the result to hex:
  00001101 00011111 00000100 = 0d 1f 04
  
  Output:
  0d1f04
  </code></pre>
  
  <p>So, to summarize, I want to be able to input two hex strings (these will usually be ASCII letters encoded in hex) of different or equal length, and get their XOR such that each byte is XORed separately.</p>