title: recasting a unsigned char array to an unsigned long array
body: <p>Ok, I'm using a raw SHA1 hash to seed a Mersenne Twister pseudo-random number generator
  the generator gives me the option to seed either with an unsigned long or a array of unsigned longs</p>
  
  <p>the SHA1 class I'm using gives me the hash as a 20 byte array of unsigned chars</p>
  
  <p>I figured I could recast this array of chars to an array of longs to get a working seed but how can I know how long the resulting array of longs is?</p>
  
  <p>example code:</p>
  
  <pre><code>CSHA1 sha1;
  sha1.Update((unsigned char*)key, size_key);
  sha1.Final();
  unsigned char* hash;
  sha1.GetHash(hash);
  
  // Seed the random with the key
  MTRand mt((unsigned long*)hash, &lt;size of array of longs&gt;);
  </code></pre>
  
  <p>I'm hoping that there is no data loss (as in no bytes are dropped off) as I need this to remain cryptography secure</p>