sydapi/DProto/Q2.xml
2021-06-29 11:32:24 +08:00

168 lines
5.0 KiB
XML
Raw Permalink 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>Q2</hex>
</command>
<data extend="data">
<alg len="1" cn="解密算法">
<options>
<option cn="DES">
<hex>1</hex>
</option>
<option cn="3DES">
<hex>2</hex>
</option>
<option cn="IDEA">
<hex>3</hex>
</option>
<option cn="SM1">
<hex>4</hex>
</option>
<option cn="AES">
<hex>5</hex>
</option>
<option cn="SM4">
<hex>6</hex>
</option>
</options>
</alg>
<roundModel len="1" cn="密钥解密模式">
<options>
<option cn="ECB">
<hex>1</hex>
</option>
<option cn="CBC">
<hex>2</hex>
</option>
<option cn="CFB">
<hex>3</hex>
</option>
<option cn="OFB">
<hex>4</hex>
</option>
</options>
</roundModel>
<fullMode len="1" cn="填充模式">
<options>
<option cn="0">
数据刚好是8的整数倍不填充
<hex>0</hex>
</option>
<option cn="1">
在数据后面填充0x00,0x00…
<hex>1</hex>
</option>
<option cn="2">
在数据后填充0x80,0x00 …
<hex>2</hex>
</option>
</options>
</fullMode>
<DEK cn="DEK秘钥">
如果源密钥为外部送入则为LMK加密否则为HSM用户密钥存储区。
27位的索引号16位机构号+3位密钥类型+8位密钥索引号
</DEK>
<businessKey len="1" cn="业务标识" required="false">
取值 N可选当选定此标识时表示密钥加密方案采用默认方式
</businessKey>
<dataLength len="4" :value="dataLen()" cn="密文数据长度">
源秘钥加密的密文数据长度
</dataLength>
<infoData cn="密文数据">
源密钥加密的密文数据
</infoData>
<vectorLength len="2" :if="2 == $packet.data.roundModel$option || 3 == $packet.data.roundModel$option || 4 == $packet.data.roundModel$option" :value="vectorLen()" cn="向量长度">
当使用CBCCFB或OFB模式时使用的初始向量长度
可选项当加密模式为CBCCFB或OFB时才显示此项
</vectorLength>
<vector :if="2 == $packet.data.roundModel$option || 3 == $packet.data.roundModel$option || 4 == $packet.data.roundModel$option" cn="向量">
初始向量数据
可选项当加密模式为CBCCFB或OFB时才显示此项
</vector>
<tailSep len="1" :if=" null != $packet.data.tail " cn="终止信息分隔符">
可选项。如果显示消息尾域则该域必须显示。值为“X19”。
<hex>19</hex>
</tailSep>
<tail maxLen="32" required="false" cn="消息尾">
可选项。最大长度为 32个字符。
</tail>
</data>
</req>
<res>
<command>
<hex>Q3</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="LMK错误报告给管理员">
<hex>13</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="密钥方案错误">
<hex>26</hex>
</option>
<option cn="数据长度错误">
<hex>80</hex>
</option>
</options>
</error>
<dataLength len="4" cn="明文数据长度">
</dataLength>
<infoData :len="resDataLen()" cn="明文数据">
解密后的明文数据
</infoData>
<tailSep len="1" required="false" cn="尾分隔">
可选项。如果显示消息尾域,则该域必须显示。值为 “X19”。
<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 vectorLen(){
var data = $packet.data;
return data.vector.length;
}
function resDataLen(){
return Util.a2i( $final.getSection('data').getSection('dataLength') )
} </script>
</packet>