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

109 lines
2.6 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<packet extend="base">
<req>
<command>
<hex>93</hex>
</command>
<data extend="data">
<privateKeyLength len="4" :value="privateKeyLen()" cn="私钥的长度"></privateKeyLength>
<privateKey cn="私钥"></privateKey>
<publicKeyLength len="4" :value="publicKeyLen()" cn="公钥的长度"></publicKeyLength>
<publicKey cn="公钥"></publicKey>
<dataLength len="4" :value="dataLen()" cn="数据的长度"></dataLength>
<data cn="数据"></data>
</data>
</req>
<res>
<command>
<hex>94</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="公钥不符合编码规则">
<hex>04</hex>
</option>
<option cn="无效的签名标识">
<hex>06</hex>
</option>
<option cn="无效的附加标识">
<hex>07</hex>
</option>
<option cn="密钥奇偶校验错误">
<hex>10</hex>
</option>
<option cn="LMK 错误">
LMK 错误;报告给管理员。
<hex>13</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="DSP 错误">
DSP 错误;报告给管理员。
<hex>47</hex>
</option>
<option cn="密钥块长度错误">
<hex>76</hex>
</option>
<option cn="信息长度错">
<hex>80</hex>
</option>
</options>
</error>
<dev len="16" cn="设备编号" >
设备编号
</dev>
<signLength len="4" cn="签名长度">
签名长度
</signLength>
<sign :len="getSignLen()" cn="密钥">
密钥
</sign>
</data>
</res>
<script>
function dataLen(){
var data = $packet.data;
return data.data.length;
}
function privateKeyLen(){
var data = $packet.data;
return data.privateKey.length;
}
function publicKeyLen(){
var data = $packet.data;
return data.publicKey.length;
}
function getSignLen() {
return Util.a2i( $final.getSection('data').getSection('signLength') )
} </script>
</packet>