c - Converting characters to hexadecimal -


I'm trying to change a cipher (AES encryption) in hexadecimal values.

I am using the following code (state Sifrtekst) for conversion:

  foreach (char * V, state) {printf ( "% 02X", * V); }   

For this cipher:

  '4 ayen w [â ?? ¢ úà ?? J $ one ?? ¶U6   

I get this output:

  2734FFFFFFA5575BFFFFFF99FFFFFFFAFFFFFFCB6A240BFFFFFFD318FFFFFFB65536   

Who correct hex for this cipher is not. I tried other conversion methods, which all took for the same result. In

Edit: foreach code:

  # foreach (item Put array) to \ (int = 1, \ count = 0, \ size = sizeof (array ) / Sizeof * (array); \ keep & count! = Size; \ keep =! Keep, Calculate ++) \ for (item = (array) + count; keep; keep =! Keep)    

It is not C, there is no foreach in C. It may be C ++, in that case the problem is that the printf () of the % x conversion specification is being reason-being expanded. There is a signed char type on the probability of your platform. Cast the value to

Unsigned four .

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -