解码这个TLV有问题
模板标签(7001)2字节
长度标签(0020)2字节
值是另一个TLV
标签(e101)长度(000f)值(373834313938353338353236313430)
标签(e102)长度(0009)值(0009303931383631393038)
70010020 e101000f373834313938353338353236313430e1020009303931383631393038
当我尝试任何TLV解码器时,它只将模板标签读取为1字节,然后其余部分将被遗漏。你能告诉我如何解析它吗?顺便说一下,我收到的数据为Base64String然后我转换为HEX
BER解码器对TLV流的解释如下:
byte 1, byte 2, byte 3, byte 4
T=01110000, L=00000001, V=00000000, <end>
^ inner TLV, starts with T=0 and no place for LV
^ length of the V is 1 byte (!!! this why it ends prematurely !!!)
^ 10000=SEQUENCE or SEQUENCE OF tag 16
^ 1=constructed tag
^ 01=APPLICATION tag