sydapi/DProto/NE.xml
2022-01-10 17:54:07 +08:00

133 lines
3.7 KiB
XML
Raw 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>NE</hex>
</command>
<data extend="data">
<keyType len="3" cn="密钥类型">
密钥类型
</keyType>
<solution len="1" cn="密钥长度/LMK 下加密密钥的方案。">
密钥长度/LMK 下加密密钥的方案。
</solution>
<flag len="1" cn="业务标识">
业务标识
</flag>
<print cn="打印域">
; 分隔多个打印域
</print>
<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>NF</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="密钥奇偶校验错">
<hex>01</hex>
</option>
<option cn="ZMK 奇偶校验错">
<hex>10</hex>
</option>
<option cn="用户存储区中没有装载密钥">
<hex>12</hex>
</option>
<option cn="LMK 错误">
LMK 错误;报告给管理员。
<hex>13</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="不在授权状态">
<hex>17</hex>
</option>
<option cn="无效用户存储区索引">
<hex>21</hex>
</option>
<option cn="无效的密钥类型">
<hex>28</hex>
</option>
<option cn="无效的密钥方案">
<hex>26</hex>
</option>
<option cn="输入数据长度错误">
<hex>80</hex>
</option>
</options>
</error>
<keyHead len="1" cn="lmk 头">
如果是 'Z' lmk 16 个字节长
如果是 'X,U,S' lmk 32 个字节长
如果是 'Y,T' lmk 48 个字节长
</keyHead>
<key :len="Len()" cn="密钥LMK">
LMK 加密下的密钥。
</key>
<keyCheck :len="keyCheckLen()" cn="密钥校验值">
密钥校验值。当 LMK 保护密钥的方案为SKCV 为
32H算法为 SM4否则 KCV 为 16H算法为 DES/3DES
</keyCheck>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>function Len() {
if( $final.data.keyHead.eqStr("Y") || $final.data.keyHead.eqStr("T") ){
return 48
}else if( $final.data.keyHead.eqStr("X") || $final.data.keyHead.eqStr("U") || $final.data.keyHead.eqStr("S") ){
return 32
}
return 15
}
function keyCheckLen() {
if ( $final.data.keyHead.eqStr("S") ) {
return 32
} else {
return 6
}
}
</script>
</packet>