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

139 lines
3.5 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>MC</hex>
</command>
<data extend="data">
<businessKey len="1" cn="业务标识" required="false">
取值 P可选当选定此标识时表示密钥加密方案采用默认方式
</businessKey>
<alg len="1" cn="算法">
<options>
<option cn="DES">
<hex>0</hex>
</option>
<option cn="3DES">
<hex>1</hex>
</option>
<option cn="SM4">
<hex>2</hex>
</option>
<option cn="AES">
<hex>3</hex>
</option>
<option cn="IDEA">
<hex>4</hex>
</option>
<option cn="SM1">
<hex>5</hex>
</option>
<option cn="3DESX919">
<hex>6</hex>
</option>
</options>
</alg>
<keyType len="1" cn="密钥类型">
<options>
<option cn="TAK">
<hex>0</hex>
</option>
<option cn="ZAK">
<hex>1</hex>
</option>
</options>
</keyType>
<fullMode len="1" cn="填充类型">
<options>
<option cn="弱填充">
<hex>0</hex>
</option>
<option cn="强填充">
<hex>1</hex>
</option>
</options>
</fullMode>
<MACLen len="1" cn="MAC数据长度">
<options>
<option cn="4">
<hex>1</hex>
</option>
<option cn="8">
<hex>2</hex>
</option>
<option cn="16">
<hex>3</hex>
</option>
</options>
</MACLen>
<key cn="密钥">
</key>
<MAC cn="MAC">
8H或16H或32H
</MAC>
<MACData maxLen="1024" cn="MAC数据">
生成MAC的数据n=1024
数据长度应该为8的整数倍如果不是8的整数倍系统默认在数据后面填充0x00组成8的整数倍。
</MACData>
</data>
</req>
<res>
<command>
<hex>MD</hex>
</command>
<data>
<error len="2" cn="错误码" format="X" :catch="catchError('%s')">
<options>
<option cn="无错误">
<hex>00</hex>
</option>
<option cn="TAK奇偶校验错">
<hex>10</hex>
</option>
<option cn="用户存储区没有装载密钥">
<hex>12</hex>
</option>
<option cn="LMK错误报告给管理员">
<hex>13</hex>
</option>
<option cn="输入数据错">
<hex>15</hex>
</option>
<option cn="无效的用户存储索引">
<hex>21</hex>
</option>
<option cn="密钥方案错误">
<hex>26</hex>
</option>
<option cn="输入数据长度错误">
<hex>80</hex>
</option>
</options>
</error>
</data>
</res>
<script>
</script>
</packet>