sydapi/DProto/8005.xml

105 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>
<bin>8005</bin>
</command>
<data extend="data">
<rFlag len="1" required="false" cn="RSA算法标志">
可选存在则固定值为P
</rFlag>
<DN len="256" cn="证书 DN">
X509证书序号
</DN>
<hashFlag cn="是否为 hash 模式" len="1" required="false"></hashFlag>
<hash cn="hash 值" :if="null != $packet.data.hashFlag"></hash>
<dataLen :if="null == $packet.data.hashFlag" len="2" format="X" :value="dataLength()" cn="数据长度">
数据长度
</dataLen>
<infoData :if="null == $packet.data.hashFlag" cn="数据">
数据
</infoData>
</data>
</req>
<res>
<command>
<bin>8006</bin>
</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>49</hex>
</option>
<option cn="密钥块长度错误">
<hex>76</hex>
</option>
<option cn="输入数据长度错误">
<hex>80</hex>
</option>
</options>
</error>
<signatureLen len="2" cn="签名的字节长度">
签名的字节长度
</signatureLen>
<signature :len="signatureLen()" cn="签名的 DER 编码">
签名的 DER 编码
</signature>
</data>
</res>
<script><![CDATA[ function dataLength(){
def len = $packet.data.infoData.length;
def data = new byte[2];
data[0] = (byte)(len >> 8 & 0xFF)
data[1] = (byte)(len & 0xFF)
return data;
}
function signatureLen() {
return Util.b2i( $final.getSection('data').getSection('signatureLen') )
} ]]> </script>
</packet>