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

106 lines
2.9 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>LF</hex>
</command>
<data extend="data">
<indexFlag len="1" cn="索引标志">
值为“K”。
</indexFlag>
<index len="27" cn="索引地址">
指示用户密钥存储区的27位地址。
27位的索引号16位机构号+3位密钥类型+8位密钥索引号
</index>
<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>LG</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="用户密钥存储区没有装载数据">
<hex>12</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="无效的用户密钥存储索引">
<hex>21</hex>
</option>
<option cn="无效的索引值">
<hex>22</hex>
</option>
</options>
</error>
<keyHead len="1" cn="key 头">
如果是 'Z' key 16 个字节长
如果是 'X,U,S' key 32 个字节长
如果是 'Y,T' key 48 个字节长
</keyHead>
<key :len="keyLen()" cn="KEY">
被加密的密钥
</key>
<keyCheck :len="keyCheckLen()" cn="密钥校验值" required="false">
S-32Helse-16H(目前仅3.07_B目标代码生效)
</keyCheck>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function keyLen() {
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
}else{
return 16
}
}
function keyCheckLen() {
if( $final.data.keyHead.eqStr("S") ){
return 32
}else{
return 16
}
}
</script>
</packet>