title: XTEA decryption using Key in hex format
body: <p>I am trying to decrypt data which was encrypted using XTEA algorithm. I have the 128-bit key.</p>
  
  <p>All the implementations I checked so far accept the key as a 16 char string (ASCII). However, my key is in hexadecimal format (32 chars) or 4 DWORDs.</p>
  
  <p>Is there an implementation where I can specify the key in hex format to decrypt the data?</p>
  
  <p>I checked a few implementations online and for example here:</p>
  
  <p><a href="https://code.google.com/p/zzt-code-base/source/browse/trunk/src/python/xtea.py" rel="nofollow">https://code.google.com/p/zzt-code-base/source/browse/trunk/src/python/xtea.py</a></p>
  
  <p>It will require source code to be modified to decrypt using the key in hexadecimal format.</p>
  
  <p>specifically in the function, xtea_decrypt() in the line:</p>
  
  <pre><code>k = struct.unpack(endian+"4L",key)
  </code></pre>
  
  <p>what modification do I need to make so that I can specify the key in hexadecimal format?</p>
  
  <p>Also, if there is an existing implementation which can accept key in hex format, that will help.</p>