View Single Post
 10-02-2009, 07:14 PM #1 (permalink) ioan1k The Contributor     Join Date: Mar 2009 Location: US Posts: 76 Thanks: 0 Decimal -> Hexidecimal ASCII Conversion I am currently in need a converting a 128 byte string into a 64 byte hexidecimal string The way the conversion is to work is by converting each byte of the 128 byte string into a 2 digit hexadecimal character which would equate to 128 / 2 = 64 bytes The conversion for bytes are 1 byte is equal to 4 Characters so the original string is 512 characters long and the hexadecimal string would be 256 characters long, using these numbers I have tried converting every 4 characters into a hexadecimal but the result is 253 characters and converting that result back results in a different than the original. An Example would be Hexidecimal String Code: ```83:4a:9d:04:34:d8:17:73:55:89:f2:2a:46:33:fb:6d:d3:e5:30:db:a1:ea:2b: bb:9e:1a:cc:b4:38:08:45:13:08:7f:5d:a0:0e:a8:6e:d5:31:64:d8:89:3b:81: a9:c8:df:65:bc:18:9c:f6:83:0d:27:1e:1a:3e:50:4c:bc:b2:57:14:16:4b:51: 9c:75:f6:e0:ad:f4:1b:b0:7e:7f:8c:4f:b7:b9:96:0d:81:3e:65:77:a7:32:52: ee:a9:c1:39:cd:da:60:6d:51:12:21:70:e7:16:36:e7:84:91:49:61:8c:82:38: a2:26:12:88:21:f0:b6:68:49:0b:dc:a8:2f``` Orignal String Code: ```3833346139643034333464383137373335353839663232 6134363333666236646433653533306462613165613262 6262396531616363623433383038343531333038376635 6461303065613836656435333136346438383933623831 6139633864663635626331383963663638333064323731 6531613365353034636263623235373134313634623531 3963373566366530616466343162623037653766386334 6662376239393630643831336536353737613733323532 6565613963313339636464613630366435313132323137 3065373136333665373834393134393631386338323338 6132323631323838323166306236363834393062646361 383266``` __________________ My Portfolio - Work - Need freelance Work? I've been developing 5 years now, and I learn something new everyday