- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在他们所指的文档中找到了 简单的 TLV 和 BER-TLV .我查看了大多数 EMV 和 GP 文档,但他们没有提到不同之处。
谁能帮我理解两者的区别?
最佳答案
ISO/IEC 7816-4 中智能卡的数据字段
BER编码
这是比较常见的BER encoding的规范ISO/IEC 7816-4 使用:
Each BER-TLV data object shall consists of 2 or 3 consecutive fields (see ISO/IEC 8825 and annex D).
The tag field T consists of one or more consecutive bytes. It encodes a class, a type and a number. The length field consists of one or more consecutive bytes. It encodes an integer L. If L is not null, then the value field V consists of L consecutive bytes. If L is null, then the data object is empty: there is no value field.
05
的单个长度字节在下面的示例中。 BER 编码的 ISO/IEC 规范基本上是美国特定 X.690 标准的副本,也反射(reflect)在国际标准 ISO/IEC 8825-1(均为付费软件)中。
Each SIMPLE-TLV data object shall consist of 2 or 3 consecutive fields.
The tag field T consists of a single byte encoding only a number from 1 to 254 (e.g. a record identifier). It codes no class and no construction-type. The length field consists of 1 or 3 consecutive bytes. If the leading byte of the length field is in the range from '00' to 'FE', then the length field consists of a single byte encoding an integer L valued from 0 to 254. If the leading byte is equal to 'FF', then the length field continues on the two subsequent bytes which encode an integer L with a value from 0 to 65535. If L in not null, then the value field V consists of consecutive bytes. If L is null, then the data object is empty: there is no value field.
0F 05 48656C6C6F // tag number 15, length 5 then the value
0F FF0005 48656C6C6F // tag number 15, length 5 (two bytes), then the value
4F 05 48656C6C6F // *application specific*, primitive encoding of tag number 15, length 5 then the value
4F 8105 48656C6C6F // the same, using two bytes to encode the length
4F 820005 48656C6C6F // the same, using three bytes to encode the length
4F 83000005 48656C6C6F // the same, using four bytes to encode the length
4F 8400000005 48656C6C6F // the same , using five bytes to encode the length
5F0F 05 48656C6C6F // **invalid** encoding of the same, with two bytes for the tag, specifiying a tag number 15 which is smaller than 31
5F1F 05 48656C6C6F // application specific, primitive encoding of **tag number 31**
关于nfc - SIMPLE-TLV 与 BER-TLV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18853800/
什么是 TLV? 在代码中放置钩子(Hook)(函数)而不是 if/else? 如果我有一段代码在不同的平台上运行,在代码的不同位置,我可以放置 TLV 函数 Hook 来识别我在哪个平台上并相应地做
我在他们所指的文档中找到了 简单的 TLV 和 BER-TLV .我查看了大多数 EMV 和 GP 文档,但他们没有提到不同之处。 谁能帮我理解两者的区别? 最佳答案 ISO/IEC 7816-4 中
我有一个为 iPhone (Objective-C) 编写的移动应用程序,允许用户使用特定格式导入数据。我用 Java 为 Android 编写了相同的应用程序,并且用户开始要求导入的能力。数据的格式
我的 SMS 服务提供商要求我在通过 SMPP 连接到他时设置以下 TLV 参数: 价格点 (0x1400) 产品 (0x1401) 合作伙伴角色 ID (0x1402) 如何在 Kannel 中进行
我正在开发用于读取 EMV 卡的智能卡读卡器。我正在处理一张万事达卡,我试图读取特定记录。结果显示读数很好,但是当我解析结果时,它们似乎不遵循 TLV 标准,其中结果采用 Tag/Template-L
我正在开发支持 EMV 卡的 POS 应用程序。我能够从 TLV 中的 Verifone MX 读卡器读取卡数据,但在将 TLV 数据解码为可读数据时遇到问题。 我能够将数据拆分为 TLV 标签及其值
好的 - 我有这个十六进制数据和标签列表: 原始数据可能是这样的: 5F201A54444320424C41434B20554E4C494D49544544205649534120204F07A000
我的方法 parseTLV() 有时无法正确地解析为构造值(子 TLV)。我使用过滤器 ((tag & 0x20)!= 0) 来检测构造的值,但有时它无法按预期工作。 例如 70178C159F020
我正在处理 Mastercard Paypass 交易,我发送了一个 READ RECORD 命令并得到了结果: 70 81 AB 57 11 54 13 33 00 89 60 10 83 D2 5
是否可以使用 boost 序列化带有 TLV 编码的字符串?或者我应该先编码,然后使用 boost 序列化二进制数据?如果是那么如何编码为TLV? 最佳答案 Boost 的二进制序列化存档已经使用了类
我正在寻找一种使用 Java 翻译 EMV 响应的方法,就像使用此在线选项一样: http://www.emvlab.org/tlvutils/ 你把像这样的 EMV 响应放在哪里: 6f3a8407
我正在使用 OnlineCity SMPP 客户端库发送 SMS。它工作正常。但是根据TRAI的新指南,我们需要在发送短信时添加以下新的TLV参数 group = smpp-tlv name = En
我正在使用 jpos 库构建一个简单的电子购买金融消息,我正在使用通用打包器来打包我的消息字段,问题出现在字段 48(TLV 字段)处。 这里是字段 48 的打包参数。
我需要将一个 C 结构转换为 TLV 格式并将其发送。有人可以帮我吗?我的结构是一个真正的嵌套结构,有很多指向不同结构的间接(指针)和很多 void *。所以,我被困住了,需要帮助。 struct a
我想读取 Java 卡上的 TLV 编码证书(NXP JCOP J3D081、JCOP 版本 2.4.2、Java 卡版本 3.0.1 Classic)。 cap 文件已成功创建,但当我尝试将其安装到
要构建嵌套 TLV 元素(例如 6F1A840E315041592E5359532E4444463031A5088801025F2D02656E),我使用以下数据结构: typedef struct
我正在尝试使用 C 来编码/解码 tlv 消息数据。实际上我是 TLV 格式的新手。我刚刚从谷歌找到了一些代码,但我不明白它们。 unsigned char *tlv_buffer = NULL; i
我想解析 TLV 字符串并在给出标签值时获取值。 示例: 000201021642333310011114235204546757034445802IN5910My Company6005Vegas6
例如我有这样的R-APDU uchar rApdu[] = {0x6F, 0x35 ,0x84 ,0x08 ,0x45 ,0x4F ,0x50 , 0x43 ,0x43 ,0x41 ,0x52
我是 Java 的新手,所以我想使用标准解决方案来完成标准任务。标签和值的长度未知。 最佳答案 您可以使用这个 BER-TLV 解析器:source code on git。 示例: 如何解析 byt
我是一名优秀的程序员,十分优秀!