164 lines
5.0 KiB
XML
164 lines
5.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
||
<packet extend="base">
|
||
<req>
|
||
|
||
<command>
|
||
<hex>75</hex>
|
||
</command>
|
||
<data extend="data">
|
||
|
||
<signatureLen len="4" :value="signatureLen()" cn="签名长度">
|
||
签名的字节长度
|
||
</signatureLen>
|
||
|
||
<signature cn="计算的签名(DER)">
|
||
计算的签名(DER)
|
||
</signature>
|
||
|
||
<signatureDataType len="1" cn="签名数据类型">
|
||
<options>
|
||
<option cn="HASH">
|
||
<hex>0</hex>
|
||
</option>
|
||
<option cn="原数据">
|
||
<hex>1</hex>
|
||
</option>
|
||
</options>
|
||
</signatureDataType>
|
||
|
||
<hashData :len="32" :if="0 == $packet.data.signatureDataType$option" cn="HASH 值">
|
||
可选项,只对“签名数据类型”为 0 时有效。
|
||
</hashData>
|
||
|
||
|
||
|
||
<userIdLength len="2" :if="1 == $packet.data.signatureDataType$option" :value="userIdLen()" cn="用户 ID 长度">
|
||
最大为 64(必须是 4 的整数倍),只对“签名数据类型”为 1 时有效
|
||
</userIdLength>
|
||
|
||
|
||
<userId :if="1 == $packet.data.signatureDataType$option" cn="用户 ID">
|
||
可选项,只对“签名数据类型”为 1 时有效。
|
||
</userId>
|
||
|
||
<dataLength len="4" :if="1 == $packet.data.signatureDataType$option" :value="dataLen()" cn="用于签名的信息数据的字节长度">
|
||
可选项,只对“签名数据类型”为 1 时有效。
|
||
</dataLength>
|
||
|
||
<infoData :if="1 == $packet.data.signatureDataType$option" cn="要签名的信息">
|
||
可选项,只对“签名数据类型”为 1 时有效。
|
||
</infoData>
|
||
|
||
<publicKeyLength len="4" :value="publicKeyLen()" cn="公钥的长度(DER)">
|
||
公钥的长度(DER)
|
||
</publicKeyLength>
|
||
|
||
<publicKey cn="公钥的 DER 编码">
|
||
公钥的 DER 编码
|
||
</publicKey>
|
||
|
||
<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>76</hex>
|
||
</command>
|
||
<data>
|
||
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
|
||
<options>
|
||
<option cn="无错误">
|
||
<hex>00</hex>
|
||
</option>
|
||
<option cn="签名校验失败">
|
||
<hex>02</hex>
|
||
</option>
|
||
<option cn="公钥不符合编码规则">
|
||
<hex>04</hex>
|
||
</option>
|
||
<option cn="无效的哈希标识">
|
||
<hex>05</hex>
|
||
</option>
|
||
<option cn="无效的签名标识">
|
||
<hex>06</hex>
|
||
</option>
|
||
<option cn="无效的附加标识">
|
||
<hex>07</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>74</hex>
|
||
</option>
|
||
<option cn="公钥长度错误">
|
||
<hex>76</hex>
|
||
</option>
|
||
<option cn="明文数据块错误">
|
||
<hex>77</hex>
|
||
</option>
|
||
<option cn="哈希算法对象标识错误">
|
||
<hex>79</hex>
|
||
</option>
|
||
<option cn="信息长度错">
|
||
<hex>80</hex>
|
||
</option>
|
||
<option cn="签名长度错">
|
||
<hex>81</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 signatureLen(){
|
||
var data = $packet.data;
|
||
return data.signature.length;
|
||
}
|
||
|
||
function dataLen(){
|
||
var data = $packet.data;
|
||
return data.infoData.length;
|
||
}
|
||
|
||
function publicKeyLen(){
|
||
var data = $packet.data;
|
||
return data.publicKey.length;
|
||
}
|
||
|
||
function userIdLen(){
|
||
var data = $packet.data;
|
||
return data.userId.length;
|
||
} </script>
|
||
</packet> |