79 lines
1.9 KiB
XML
79 lines
1.9 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
||
<packet extend="base">
|
||
<req>
|
||
|
||
<command>
|
||
<hex>S4</hex>
|
||
</command>
|
||
<data extend="data">
|
||
<storageType len="1" cn="存储类型">
|
||
<options>
|
||
<option cn="存储在内部">
|
||
<hex>0</hex>
|
||
</option>
|
||
<option cn="存储在外部">
|
||
<hex>1</hex>
|
||
</option>
|
||
</options>
|
||
</storageType>
|
||
|
||
<algorithmKey len="2" cn="算法类型">
|
||
仅支持RSA、SM2
|
||
</algorithmKey>
|
||
|
||
<keyLen len="4" cn="密钥长度">
|
||
RSA密钥长度:1024、2048
|
||
SM2密钥长度:256
|
||
</keyLen>
|
||
|
||
<keyIndex len="27" :if="0 == $packet.data.storageType$option" cn="密钥索引">
|
||
内部密钥索引, 接口层对外限制8位,通讯层限制27位,16位机构号+3位密钥类型+8位密钥索引号。前19位补0.
|
||
</keyIndex>
|
||
|
||
</data>
|
||
|
||
</req>
|
||
<res>
|
||
|
||
<command>
|
||
<hex>S5</hex>
|
||
</command>
|
||
<data>
|
||
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
|
||
<options>
|
||
<option cn="无错误">
|
||
<hex>00</hex>
|
||
</option>
|
||
</options>
|
||
</error>
|
||
|
||
<publicKeyLength len="4" cn="公钥长度">
|
||
公钥长度
|
||
</publicKeyLength>
|
||
|
||
<publicKey :len="getPubKeyLen()" cn="公钥">
|
||
公钥
|
||
</publicKey>
|
||
|
||
<privateKeyLength len="4" cn="私钥长度">
|
||
私钥长度
|
||
</privateKeyLength>
|
||
|
||
<privateKey :len="getPriKeyLen()" cn="私钥">
|
||
私钥
|
||
</privateKey>
|
||
</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>
|