0

I have 2 unsigned char arrays, when I print them both using BIO_dump_fp, I see that array1 has the same value in the second column as array2 in the third column (but in lower case):

array1:

0000 - ff 1d 43 5f 99 24 a8 60-bb 09 3b 83 ca 4d 7d 50   ..C_.$.`..;..M}P
0010 - 73 cb 98 24 9d 55 39 e8-dc 2b d2 90 f0 c2 db d5   s..$.U9..+......

array2:

0000 - 46 46 31 44 34 33 35 46-39 39 32 34 41 38 36 30   FF1D435F9924A860
0010 - 42 42 30 39 33 42 38 33-43 41 34 44 37 44 35 30   BB093B83CA4D7D50
0020 - 37 33 43 42 39 38 32 34-39 44 35 35 33 39 45 38   73CB98249D5539E8
0030 - 44 43 32 42 44 32 39 30-46 30 43 32 44 42 44 35   DC2BD290F0C2DBD5

Can somebody please explain to me what columns 2 and 3 actually represent, and how to convert array2 to the same format as array1 (as they seem to contain the same data)?

Monday to Friday
  • 239
  • 5
  • 16
  • I see two dumps one with two lines and one with four lines. None of the colums can be similar, because they have different number of values. Columns are vertical four you, aren't they? Second column of array one is "1d, cb". Third column of array two has "31, 30, 43, 32". What do you mean by "but in lower case" and "seem to contain the same data"? Mabye a short definition of what "BIO_dum_fp" is could help to make the question clearer (not so much for those who know anyway, more for those who do not know the name). Finally, the question as is does not seem to be very C-specific. – Yunnosch Dec 14 '18 at 13:52
  • @Yunnosch the text is divided into 3 columns. For array 1 the second column says "ff 1d 43 5f 99 24 a8 60-bb 09 3b 83 ca 4d 7d 50" in the first line. And for the second array, the first row of the third column of text is "FF1D435F9924A860". These is the same data. – Monday to Friday Dec 14 '18 at 14:04
  • @Yunnosch sorry hit return too early. I don't know what format of data "BIO_dum_fp" prints here, this is what I was asking. – Monday to Friday Dec 14 '18 at 14:05
  • I think we disagree on the meaning of "column". – Yunnosch Dec 14 '18 at 14:06
  • What is "BIO_dump_fp"? – Yunnosch Dec 14 '18 at 14:06
  • @Yunnosch I think it is an openSSL function. I can't find much information about it, apart from: int BIO_dump_fp(FILE *fp, const char *s, int len) { return BIO_dump_cb(write_fp, fp, s, len); } – Monday to Friday Dec 14 '18 at 14:09
  • My [answer to your other question](https://stackoverflow.com/a/53781194/1380680) may help you. – Reinier Torenbeek Dec 14 '18 at 14:11
  • Don't you think that adding that information to your question would make things easier for everybody? Maybe you can think of more helpful information to add. – Yunnosch Dec 14 '18 at 14:21

0 Answers0