sydapi/DProto/S8.xml
2021-08-12 10:47:32 +08:00

89 lines
2.2 KiB
XML
Raw 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>S8</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>
<privateKeyLen len="4" :value="getPrivateKeyLen()" :if="1 == $packet.data.storageType$option" cn="私钥长度">
仅当存储类型为1时有效
私钥长度
</privateKeyLen>
<privateKey :if="1 == $packet.data.storageType$option" cn="私钥">
仅当存储类型为1时有效
私钥
</privateKey>
<keyIndex len="27" :if="0 == $packet.data.storageType$option" cn="密钥索引">
内部密钥索引, 接口层对外限制8位通讯层限制27位16位机构号+3位密钥类型+8位密钥索引号。前19位补0
注意后八位密钥索引不允许输入全0
</keyIndex>
<inputDataLen len="4" :value="inputDataLen()" cn="密文长度">
密文长度
</inputDataLen>
<inputData cn="密文">
密文
</inputData>
</data>
</req>
<res>
<command>
<hex>S9</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
</options>
</error>
<infoLen len="4" cn="数据长度">
数据长度
</infoLen>
<info :len="getInfoLen()" cn="数据">
数据
</info>
</data>
</res>
<script>
function getPrivateKeyLen() {
return $packet.data.privateKey.length;
}
function inputDataLen(){
var data = $packet.data;
return data.inputData.length;
}
function getInfoLen(){
return Util.a2i( $final.getSection('data').getSection('infoLen') )
}
</script>
</packet>