# 旧签名算法
## 签名方法
**签名步骤如下:**
1. 根据 `key`的字段组成进行MD5加密
2. 对整体POST请求数据进行`json`化
3. 对json化的数据使用`3des`加密
4. 以`datami`为键,加密后的数据为值组成数组
5. 对数组进行`json`化后发起请求
**示例:**
key 与 3des 的秘钥
```
<pre class="calibre14">```
key <span class="token4">:</span> key
<span class="token">3</span>des <span class="token4">:</span> <span class="token">3</span>deskey
```
```
`会员注册`参数如下
```
<pre class="calibre14">```
moblie <span class="token4">:</span> <span class="token">12345678900</span>
sourceCode <span class="token4">:</span> <span class="token">1234</span>
```
```
第一步:产生 `key` 的值
```
<pre class="calibre14">```
md5(<span class="token2">"key123456789001234"</span>)
key <span class="token4">:</span> <span class="token">76</span>bead23657058efa26601d707c861c5
```
```
第二步:对整体数据json化
```
<pre class="calibre14">```
<span class="token4">{</span><span class="token2">"mobile"</span><span class="token4">:</span><span class="token2">"12345678900"</span><span class="token4">,</span><span class="token2">"sourceCode "</span><span class="token4">:</span><span class="token">1234</span><span class="token4">,</span><span class="token2">"key "</span><span class="token4">:</span><span class="token">76</span>bead23657058efa26601d707c861c5<span class="token4">}</span>
```
```
第三步:3des加密
```
<pre class="calibre14">```
Uh13IjJKAQR<span class="token1">+</span>n7f<span class="token1">+</span><span class="token">21</span>VC6DbwZnytTq6Smi674ZVDsYQBadD47dcekN99SAUj7<span class="token1">/</span>z5D0LIArc<span class="token1">+</span>YQrpwbtMqlo4KHxvZfmSzPzYx2hQEuyl<span class="token6">//4MZiRmp2KZrg==</span>
```
```
第四步:以`datami`为键,加密后的数据为值组成数组进行json化后post请求
```
<pre class="calibre15">```
<span class="token4">{</span><span class="token2">"datami"</span><span class="token4">:</span><span class="token2">"Uh13IjJKAQR+n7f+21VC6DbwZnytTq6Smi674ZVDsYQBadD47dcekN99SAUj7/z5D0LIArc+YQrpwbtMqlo4KHxvZfmSzPzYx2hQEuyl//4MZiRmp2KZrg=="</span><span class="token4">}</span>
```
```