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

102 lines
2.8 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>NG</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>
<PINBLOCK :len="dcaLen()" cn="PINBLOCK">
LMK对02-03下加密的PIN。
</PINBLOCK>
<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>NH</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="加密PIN错误">
<hex>14</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="不在授权状态">
<hex>17</hex>
</option>
</options>
</error>
<PIN :len="dcaLen()" cn="PIN" >
左对齐的、明文形式的文本PIN后面附加字符“XF”直至已加密PIN的长度。
</PIN>
<!--<referenceNum :len="dcaLen()" cn="参考数">
通过LMK对18-19下加密帐号导出的参考数。(注:被屏蔽了)
</referenceNum>-->
<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>