Use hex2bin and bin2hex instead of pack and unpack