113 lines
2.6 KiB
XML
113 lines
2.6 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<packet extend="base">
|
|
<req>
|
|
|
|
<command>
|
|
<hex>96</hex>
|
|
</command>
|
|
<data extend="data">
|
|
|
|
|
|
<keyA len="33" cn="密钥 A"></keyA>
|
|
<keyB len="33" cn="密钥 B"></keyB>
|
|
|
|
<sln len="1" cn="密钥方案"></sln>
|
|
<alg len="1" cn="算法"></alg>
|
|
|
|
</data>
|
|
|
|
|
|
|
|
</req>
|
|
<res>
|
|
|
|
<command>
|
|
<hex>97</hex>
|
|
</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>76</hex>
|
|
</option>
|
|
<option cn="输入数据长度错误">
|
|
<hex>80</hex>
|
|
</option>
|
|
</options>
|
|
</error>
|
|
|
|
<keyC len="33" cn="合成密钥">
|
|
合成密钥
|
|
</keyC>
|
|
|
|
<keyCheck :len="KCVLen()" cn="密钥校验值">
|
|
密钥校验值
|
|
</keyCheck>
|
|
|
|
<infoLen len="4" cn="附加信息长度">
|
|
附加信息长度
|
|
</infoLen>
|
|
|
|
<info :len="getInfoLen()" cn="附加信息">
|
|
附加信息
|
|
</info>
|
|
|
|
</data>
|
|
|
|
|
|
|
|
</res>
|
|
<script>
|
|
function publicKeyLen(){
|
|
var data = $packet.data;
|
|
return data.publicKey.length;
|
|
}
|
|
|
|
function privateKeyLen(){
|
|
var data = $packet.data;
|
|
return data.privateKey.length;
|
|
}
|
|
|
|
|
|
|
|
function getInfoLen() {
|
|
return Util.a2i( $final.getSection('data').getSection('infoLen') )
|
|
}
|
|
|
|
function KCVLen(){
|
|
|
|
var sln = $packet.data.sln
|
|
|
|
if ( "S".equals( sln ) ) {
|
|
return 32
|
|
}else {
|
|
return 16
|
|
}
|
|
} </script>
|
|
</packet> |