130 lines
4.1 KiB
XML
130 lines
4.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
||
<packet extend="base">
|
||
<req>
|
||
|
||
<command>
|
||
<hex>63</hex>
|
||
</command>
|
||
<data extend="data">
|
||
<keyType len="3" cn="秘钥类型">
|
||
密钥类型
|
||
</keyType>
|
||
<key cn="应用秘钥">
|
||
LMK加密下的应用密钥
|
||
27位的索引号:16位机构号+3位密钥类型+8位密钥索引号
|
||
</key>
|
||
<AlgorithmKey len="1" cn="算法标识">
|
||
取值P(可选,没有此选项,默认为算法为IDEA,输出格式0)
|
||
</AlgorithmKey>
|
||
<alg len="1" cn="密押算法">
|
||
<options>
|
||
<option cn="IDEA">
|
||
<hex>0</hex>
|
||
</option>
|
||
<option cn="SM1">
|
||
<hex>1</hex>
|
||
</option>
|
||
</options>
|
||
</alg>
|
||
<outputFormat len="1" cn="输出格式" :if="useAlgorithmKey()">
|
||
<options>
|
||
<option cn="软MD5后前8与后8异或后加密,密押取前4位并转为8字节的HEX格式">
|
||
<hex>0</hex>
|
||
</option>
|
||
<option cn="软MD5后取前8字节加密,输出8节的BIN格式">
|
||
<hex>1</hex>
|
||
</option>
|
||
</options>
|
||
</outputFormat>
|
||
<secret len="8" cn="密押">
|
||
需要验证的密押
|
||
</secret>
|
||
<!--<verify len="1" cn="验证方式">
|
||
可选,只针对应用密钥通过索引访问的情况
|
||
<options>
|
||
<option cn="只用新密钥验证">
|
||
<hex>0</hex>
|
||
</option>
|
||
<option cn="新密钥验证不过,如果老密押存在且在有效期之内,再用老密押验证">
|
||
<hex>1</hex>
|
||
</option>
|
||
</options>
|
||
</verify>-->
|
||
<dataLength len="4" :value="dataLen()" cn="数据长度">
|
||
加押数据的字节长度
|
||
</dataLength>
|
||
<infoData cn="信息数据">
|
||
加押数据
|
||
</infoData>
|
||
<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>64</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>
|
||
<tailSep len="1" required="false" cn="尾分隔">
|
||
可选项。如果显示消息尾域,则该域必须显示。值为 “X’19”。
|
||
<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;
|
||
}
|
||
}
|
||
</script>
|
||
</packet>
|