August 15th, 2000, 08:54 PM
Join Date: Jul 2000
Time spent in forums: < 1 sec
Reputation Power: 0
I have a situation where I have an
8-byte string which is represented as
16 hex digits. How do I convert a 16 hex
digit string to an 8-byte binary string?
I know I can use bin2hex to go from
a binary string to a hex string (very useful)
but is there a way to go the other direction?
Right now I have a solution, which is
to use a loop to go through the hex string
one byte at a time, but that doesn't seem
like a good way to do it. It seems
like I should be able to use the pack()
command, but I can't get it to work.