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

119 lines
3.4 KiB
XML
Raw Permalink 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>E2</hex>
</command>
<data extend="data">
<algorithmId len="1" cn="算法标识">
<options>
<option cn="RSA">
<hex>0</hex>
</option>
<option cn="SM2">
<hex>1</hex>
</option>
</options>
</algorithmId>
<keyLength len="4" cn="密钥长度">
RSA 算法,算法长度 03202048
SM2 算法,算法长度固定为 0256
</keyLength>
<flag len="1" cn="是否存储标志" required="false">
可选存在则固定值为P
</flag>
<index len="27" cn="索引" :if="null != $packet.data.flag">
存储标志存在时存在27位数字以此索引存储生成的密钥
</index>
<startTime len="8" cn="生效时间" :if="null != $packet.data.flag">
存储标志存在时存在,密钥生效时间
</startTime>
<endTime len="8" cn="失效时间" :if="null != $packet.data.flag">
存储标志存在时存在,密钥失效时间
</endTime>
<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>E3</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="无效的哈希标识">
<hex>05</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="DSP 错误">
DSP 错误;报告给管理员。
<hex>47</hex>
</option>
<option cn="数据长度错误">
<hex>80</hex>
</option>
</options>
</error>
<privateKeyLength len="4" cn="私钥长度">
私钥的密文长度
</privateKeyLength>
<privateKey :len="getPriKeyLen()" cn="私钥">
LMK 加密下的私钥LMK34-35
</privateKey>
<publicKeyLength len="4" cn="公钥长度">
公钥长度DER
</publicKeyLength>
<publicKey :len="getPubKeyLen()" cn="公钥">
公钥的 DER 编码
</publicKey>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>function getPubKeyLen() {
return Util.a2i( $final.getSection('data').getSection('publicKeyLength') )
}
function getPriKeyLen() {
return Util.a2i( $final.getSection('data').getSection('privateKeyLength') )
}
</script>
</packet>