support endian for str2hex