How to convert fom string to hexadecimal?
<p>I have the following <code>string: s="80"</code>. I need to put this in an 
<code>unsigned char k[]. The unsigned char should look like this: unsigned char k[]={0x38,0x34}, where 0x38=8 and 0x34=0</code> These are the hexadecimal values for 8 and 0. How to do this? Need some help!</p>

<p>Please give some code. Thx</p>

<p>I am working on ubuntu c++ code. THX!</p>

<p>I use this for an encryption! I need 0x38 in an unsigned char.PLEASE HELP! Need some code:)</p>

<p>EDIT:</p>

<p>HOW TO OBTAIN THE DEC/CHAR VALUE AND PUT IT IN AN <code>unsigned char k[]</code>?
I've realised that it's ok if in the <code>unsigned char [] i have the dec values {56,52} of the 8 and 0 that i have in the string!</code></p>
