sydapi/DProto/BA.xml
2021-06-29 11:32:24 +08:00

95 lines
2.6 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
加密一个文本PIN的明文。注意HSM必须处于授权状态。
<command>
<hex>BA</hex>
</command>
<data extend="data">
<alg len="1" cn="算法标识">
<options>
<option cn="3DES">
<hex>0</hex>
</option>
<option cn="SM4">
<hex>1</hex>
</option>
</options>
</alg>
<pin cn="PIN">
左对齐的形式的文本PIN后面附加字符“XF”直至已加密PIN的长度。其值在安全配置“CS”命令中设置范围为5至13。例如PIN123456此字段应该为06123456FFFFFFFF(8字节分组算法)
</pin>
<account cn="账号">
账号中去除校验位的最右12位。
</account>
<tailSep len="1" :if=" null != $packet.data.tail " cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为
“X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</req>
<res>
<command>
<hex>BB</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="LMK 错误">
LMK 错误;报告给管理员。
<hex>13</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="不在授权状态">
<hex>17</hex>
</option>
</options>
</error>
<pinBlock :len="dcaLen()" format="X" cn="PIN 块" >
LMK 对02-03下加密的 PIN
</pinBlock>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function dcaLen() {
if(1 == $packet.get('data').get('alg$option')){
return 32
}else {
return 16
}
}
</script>
</packet>