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

213 lines
6.5 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>
<command>
<hex>CB</hex>
</command>
<data extend="data">
<srcKeyType len="3" cn="源秘钥类型">
查看密钥类型表
</srcKeyType>
<desKeyType len="3" cn="目的秘钥类型">
查看密钥类型表
</desKeyType>
<srcKey cn="源秘钥">
当前加密PIN块的密钥LMK加密的密文。
27位的索引号16位机构号+3位密钥类型+8位密钥索引号
</srcKey>
<desKey cn="目的秘钥">
将要加密PIN块的密钥LMK加密的密文。
27位的索引号16位机构号+3位密钥类型+8位密钥索引号
</desKey>
<algorithmKey len="1" cn="算法标识" required="false">
取值P可选没有此选项默认为算法为3DES
</algorithmKey>
<sca len="1" cn="源算法SCA" :if="null != $packet.data.algorithmKey" required="false">
<options>
<option cn="3DES">
<hex>1</hex>
</option>
<option cn="SM4">
<hex>2</hex>
</option>
</options>
</sca>
<dca len="1" cn="目的算法DCA" :if="null != $packet.data.algorithmKey" required="false">
<options>
<option cn="3DES">
<hex>1</hex>
</option>
<option cn="SM4">
<hex>2</hex>
</option>
</options>
</dca>
<sPin :len="scaLen()" cn="源PIN块">
源密钥加密的源PIN块源算法3DES时16H源算法SM4时32H。
</sPin>
<sPinType len="2" cn="源PIN块格式">
<options>
<option cn="带主帐号的ANSI9.8格式">
<hex>01</hex>
</option>
<option cn="Docutel ATM">
<hex>02</hex>
</option>
<option cn="Diebold and IBM ATM">
<hex>03</hex>
</option>
<option cn="Plus Network">
<hex>04</hex>
</option>
<option cn="ISO9564-1-1格式1NP..PR...R">
<hex>05</hex>
</option>
<option cn="不带主帐号的ANSI9.8格式">
<hex>06</hex>
</option>
</options>
</sPinType>
<dPinType len="2" cn="目的PIN块格式">
<options>
<option cn="带主帐号的ANSI9.8格式">
<hex>01</hex>
</option>
<option cn="Docutel ATM">
<hex>02</hex>
</option>
<option cn="Diebold and IBM ATM">
<hex>03</hex>
</option>
<option cn="Plus Network">
<hex>04</hex>
</option>
<option cn="ISO95641-format 1格式1NP..PR...R">
<hex>05</hex>
</option>
<option cn="不带主帐号的ANSI9.8格式">
<hex>06</hex>
</option>
</options>
</dPinType>
<primaryAccount len="12" cn="主账号">
账号中去除校验位的最右12位。
</primaryAccount>
<businessKey len="1" cn="业务标识" required="false">
取值 N可选当选定此标识时表示密钥加密方案采用默认方式
</businessKey>
<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>CC</hex>
</command>
<data>
<error len="2" cn="错误代码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="源ZPK奇偶校验错">
<hex>10</hex>
</option>
<option cn="目的ZPK奇偶校验错">
<hex>11</hex>
</option>
<option cn="用户存储区中没有装载密钥">
<hex>12</hex>
</option>
<option cn="LMK错误报告给管理员">
<hex>13</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="无效的用户存储索引">
<hex>21</hex>
</option>
<option cn="帐号无效">
<hex>22</hex>
</option>
<option cn="无效PIN块格式代码">
<hex>23</hex>
</option>
<option cn="PIN小于4位或大于12位">
<hex>24</hex>
</option>
<option cn="无效的密钥方案">
<hex>26</hex>
</option>
<option cn="数据长度错误">
<hex>80</hex>
</option>
</options>
</error>
<pinLen len="2" cn="PIN长度">
所返回PIN的长度。
</pinLen>
<dPin :len="dcaLen()" cn="目的PIN块">
目的秘钥下加密的目的PIN块。
</dPin>
<dPinType len="2" cn="目的PIN块格式">
格式代码与收到的命令消息中的值相同。
</dPinType>
<tailSep len="1" required="false" cn="终止信息分隔符">
可选项。如果显示消息尾域,则该域必须显示。值为 “X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="消息尾">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function scaLen() {
if(1 == $packet.get('data').get('sca$option')){
return 32
}else {
return 16
}
}
function dcaLen() {
if(1 == $packet.get('data').get('dca$option')){
return 32
}else {
return 16
}
}
</script>
</packet>