title: Unsigned char to char* and int in C?
body: <p>Working on some encryption that requires unsigned char's in the functions, but want to convert to a char for use after it's been decrypted. So, I have:</p>
  
  <pre><code>unsigned char plaintext[16];
  char *plainchar;
  int plainint;
  
  ... Code now populates plaintext with data that happens to all be plain text
  </code></pre>
  
  <p>Now at this point, let's say plaintext is actually a data string of "0123456789". How can I get the value of plaintext into plainchar as "012456789", and at the same time plainint as 123456789?</p>
  
  <p>-- Edit --</p>
  
  <p>Doing this when plaintext is equal to "AAAAAAAAAA105450":</p>
  
  <pre><code>unsigned char plaintext[16];
  char *plainchar;
  int plainint;
  
  ... Code now populates plaintext with data that happens to all be plain text
  
  plainchar = (char*)plaintext;
  </code></pre>
  
  <p>Makes plainchar equal to "AAAAAAAAAA105450╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠╠┤∙7" with a sizeof = 51. The encryption code is the rijndael example code, so it should be working fine.</p>
  
  <p>Thanks,
  Ben</p>