fixed the hexStringtoByteArray method array overflow