武汉人行指令整合

This commit is contained in:
zhoubin
2021-08-11 13:56:19 +08:00
parent 73ad09279e
commit 45f81f4685
15 changed files with 1479 additions and 259 deletions
+97
View File
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
<command>
<hex>90</hex>
</command>
<data extend="data">
<equipType len="16" cn="设备型号">
设备型号
</equipType>
<equipNo len="16" cn="设备序号">
设备型号
</equipNo>
<equipSkLen :value="equipSkLen()" cn="设备密钥私钥长度">
设备密钥私钥长度
</equipSkLen>
<equipSk cn="设备密钥私钥">
设备密钥私钥
</equipSk>
<equipPkLen :value="equipPkLen()" cn="设备密钥公钥长度">
设备密钥公钥长度
</equipPkLen>
<equipPK cn="设备密钥公钥">
设备密钥公钥
</equipPK>
<manuPkLen :value="manuPkLen()" cn="厂商公钥长度">
厂商公钥长度
</manuPkLen>
<manuPk cn=" 厂商公钥">
厂商公钥
</manuPk>
<authSign len="64" cn="授权签名">
授权签名
</authSign>
<tailSep len="1" :if=" null != $packet.data.tail " cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为
“X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</req>
<res>
<command>
<hex>91</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
</options>
</error>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function equipSkLen(){
var data = $packet.data;
return data.equipSk.length;
}
function equipPkLen(){
var data = $packet.data;
return data.equipPk.length;
}
function manuPkLen(){
var data = $packet.data;
return data.manuPk.length;
}
</script>
</packet>
+77
View File
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
<command>
<hex>91</hex>
</command>
<data extend="data">
<equipSkLen :value="equipSkLen()" cn="设备密钥私钥长度">
设备密钥私钥长度
</equipSkLen>
<equipSk cn="设备密钥私钥">
设备密钥私钥
</equipSk>
<equipPkLen :value="equipPkLen()" cn="设备密钥公钥长度">
设备密钥公钥长度
</equipPkLen>
<equipPK cn="设备密钥公钥">
设备密钥公钥
</equipPK>
<authSign len="64" cn="授权签名">
授权签名
</authSign>
<tailSep len="1" :if=" null != $packet.data.tail " cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为
“X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</req>
<res>
<command>
<hex>92</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
</options>
</error>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function equipSkLen(){
var data = $packet.data;
return data.equipSk.length;
}
function equipPkLen(){
var data = $packet.data;
return data.equipPk.length;
}
</script>
</packet>
+73
View File
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
<command>
<hex>92</hex>
</command>
<data extend="data">
<tailSep len="1" :if=" null != $packet.data.tail " cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为
“X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</req>
<res>
<command>
<hex>93</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
</options>
</error>
<equipType len="16" cn="设备型号" >
设备型号
</equipType>
<equipNo len="16" cn="设备序号" >
设备序号
</equipNo>
<equipPkLen len="4" cn="设备密钥公钥长度">
设备密钥公钥长度,在下一个域中的字节长度
</equipPkLen>
<equipPk :len="resequipPkLen()" cn="设备密钥公钥" >
设备密钥公钥
</equipPk>
<authSign len="64" cn="授权签名">
授权签名
</authSign>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function resequipPkLen(){
return Util.a2i( $final.getSection('data').getSection('equipPkLen') )
}
</script>
</packet>
+64
View File
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
<command>
<hex>97</hex>
</command>
<data extend="data">
<hashData :len="32" cn="哈希数据">
哈希数据
</hashData>
<tailSep len="1" :if=" null != $packet.data.tail " cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为
“X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</req>
<res>
<command>
<hex>98</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
</options>
</error>
<signatureLen len="4" cn="签名的字节长度">
签名的字节长度
</signatureLen>
<signature :len="signatureLen()" cn="签名的 DER 编码">
签名的 DER 编码
</signature>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function signatureLen() {
return Util.a2i( $final.getSection('data').getSection('signatureLen') )
}
</script>
</packet>
+63
View File
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
<command>
<hex>98</hex>
</command>
<data extend="data">
<tokenLen len="4" :value="tokenLen()" cn="Token密文长度">
Token密文长度
</tokenLen>
<token cn=" Toke密文">
Toke密文
</token>
<tailSep len="1" :if=" null != $packet.data.tail " cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为
“X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</req>
<res>
<command>
<hex>99</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
</options>
</error>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function tokenLen(){
var data = $packet.data;
return data.token.length;
}
</script>
</packet>
+81
View File
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
<command>
<hex>99</hex>
</command>
<data extend="data">
<certiContentLen len="4" :value="certiContentLen()" cn="认证内容长度">
认证内容长度
</certiContentLen>
<certiContent cn="认证内容">
认证内容
</certiContent>
<tailSep len="1" :if=" null != $packet.data.tail " cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为
“X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</req>
<res>
<command>
<hex>9A</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
</options>
</error>
<equipType len="16" cn="设备型号" >
设备型号
</equipType>
<equipNo len="16" cn="设备序号" >
设备序号
</equipNo>
<authenCodeLen len="4" cn="认证码长度">
认证码长度
</authenCodeLen>
<authenCode :len="authenCodeLen()" cn="认证码" >
认证码
</authenCode>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function certiContentLen(){
var data = $packet.data;
return data.certiContent.length;
}
function authenCodeLen(){
return Util.a2i( $final.getSection('data').getSection('authenCodeLen') )
}
</script>
</packet>
+1
View File
@@ -27,6 +27,7 @@
<zmk cn="ZMK" :if="hasZmk()">
仅当模式为 1 时才显示该 ZMK 域
27位的索引号:16位机构号+3位密钥类型+8位密钥索引号
</zmk>
<keySolution len="1" cn="加密输出密钥的密钥方案" :if="1 == $packet.data.mode$option">