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

128 lines
3.8 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>65</hex>
</command>
<data extend="data">
<keyType len="3" cn="秘钥类型">
密钥类型
</keyType>
<srcKey cn="源应用秘钥">
LMK加密下的应用密钥
27位的索引号16位机构号+3位密钥类型+8位密钥索引号
</srcKey>
<aimKey cn="目的应用秘钥">
LMK加密下的应用密钥
27位的索引号16位机构号+3位密钥类型+8位密钥索引号
</aimKey>
<AlgorithmKey len="1" cn="算法标识">
取值P可选没有此选项默认为算法为IDEA输出格式0
</AlgorithmKey>
<alg len="1" cn="加密算法" :if="useAlgorithmKey()">
<options>
<option cn="IDEA">
<hex>0</hex>
</option>
<option cn="SM1">
<hex>1</hex>
</option>
<option cn="3DES">
<hex>2</hex>
</option>
<option cn="SM4">
<hex>3</hex>
</option>
</options>
</alg>
<dataLength len="4" :value="dataLen()" cn="密文数据长度">
密文数据长度
</dataLength>
<infoData cn="密文数据">
密文数据
</infoData>
<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>66</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="用户存储区没有装载密钥">
<hex>12</hex>
</option>
<option cn="LMK 错误">
LMK 错误;报告给管理员。
<hex>13</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="无效的用户存储索引">
<hex>21</hex>
</option>
<option cn="密钥方案错误">
<hex>26</hex>
</option>
<option cn="输入数据长度错误">
<hex>80</hex>
</option>
</options>
</error>
<infoLen len="4" cn="密文数据长度">
密文数据长度
</infoLen>
<info :len="infoLen()" cn="密文数据">
密文数据
</info>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="尾部">
可选项。最大长度为 32个字符。
</tail>
</data>
</res>
<script>
function dataLen(){
var data = $packet.data;
return data.infoData.length;
}
function useAlgorithmKey(){
if( "P".equals(new String($packet.data.AlgorithmKey) ))
{
return true;
}else{
return false;
}
}
function infoLen(){
return Util.a2i( $final.getSection('data').getSection('infoLen') )
}
</script>
</packet>