17 May
2017
17 May
'17
10:46 a.m.
Hey,
On 05/15/17 15:48, Leonel Gaspar Soares wrote:
Hello, I would like to print the hash string of my files in dtnoutbox, but when I make this line in the code:
cout << of.getHash().getHash()<<endl;
to get all the hashes, the caracters that I see are not readable. Can anybody help me to convert these characters to readable form?
that's easy. IBR-DTN uses OpenSSL's MD5 interface for that ([0] and corresponding). Thus, MD5 hashes are stored plain in 16 Bytes. Just convert the contents of the string to hex and you get the familiar representation.
[0] https://github.com/ibrdtn/ibrdtn/blob/1da5501fc3fc29c52ddfe694671d5c1147a940...
Best, Martin
--
,---- [ contact info ]
| Martin Wegner, M.Sc.
| IBR, research group Connected and Mobile Systems
| Technische Universität Braunschweig
| office:
| Mühlenpfordtstraße 23, room 131
| 38106 Braunschweig, Germany
| phone: +49 531 391 3246
| mail: wegner@ibr.cs.tu-bs.de
| GnuPG key: 0x04210FF947C76DD7
`----