title: 16 byte unsigned char array as a number?
body: <p>I am doing some cryptography with 128bit keys which necessitates using 16byte data chunks which I am storing as 16 byte unsigned char arrays.</p>
  
  <pre><code>unsigned char nonce_counter[16] = "xCv6Jk0neeV5GoSZ";
  </code></pre>
  
  <p>I frequently need to treat the value as a number to do some math, but I can't seem to find a safe way to type-cast the value. </p>
  
  <p><em>How can I cast a 16byte value to a numerical data type?</em></p>
  
  <p>Specifically, I need to use bitwise XOR <strong>A^B</strong> and increment <strong>A++</strong>.</p>
  
  <p>I know I could do the obvious and use a for loop and deal with each element of the array independently, but I am concerned about the efficiency lost in doing so.</p>
  
  <p>My system does not support <code>__uint128_t</code>.</p>