71 lines
1.5 KiB
XML
71 lines
1.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<packet extend="base">
|
|
<req>
|
|
|
|
<command>
|
|
<hex>SB</hex>
|
|
</command>
|
|
<data extend="data">
|
|
<keyLength len="4" :value="keyLen()" cn="外部密钥长度">
|
|
外部密钥密文长度
|
|
</keyLength>
|
|
|
|
<key cn="外部密钥">
|
|
外部密钥密文
|
|
</key>
|
|
|
|
<seedLen len="4" :value="getSeedLen()" cn="种子长度">
|
|
种子长度
|
|
</seedLen>
|
|
|
|
<seed cn="种子">
|
|
种子
|
|
</seed>
|
|
|
|
<outLen len="4" cn="输出数据长度">
|
|
输出数据长度
|
|
</outLen>
|
|
|
|
</data>
|
|
|
|
</req>
|
|
<res>
|
|
|
|
<command>
|
|
<hex>SC</hex>
|
|
</command>
|
|
<data>
|
|
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
|
|
<options>
|
|
<option cn="无错误">
|
|
<hex>00</hex>
|
|
</option>
|
|
</options>
|
|
</error>
|
|
|
|
<pHashLen len="4" cn="输出数据长度">
|
|
输出数据长度
|
|
</pHashLen>
|
|
|
|
<pHash :len="getPHashLen()" cn="pHash">
|
|
输出的指定长度的数据
|
|
若指定长度小于块长的整数倍,则取满足返回长度最小整数倍的前指定长度个字节
|
|
</pHash>
|
|
</data>
|
|
|
|
</res>
|
|
<script>
|
|
function keyLen() {
|
|
return $packet.data.key.length;
|
|
}
|
|
|
|
function getSeedLen(){
|
|
return $packet.data.seed.length;
|
|
}
|
|
|
|
function getPHashLen(){
|
|
return Util.a2i( $final.getSection('data').getSection('pHashLen') )
|
|
}
|
|
</script>
|
|
</packet>
|