-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsigncode.py
48 lines (34 loc) · 997 Bytes
/
signcode.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# !/usr/bin/python3
# -*- coding:utf-8 -*-
# -------------------------------------------------------------------------------
# Name: guilv
# Author: Android玄机
# Date: 2022/07/31‘
# -------------------------------------------------------------------------------
import hashlib
body = {
"appkey": "xxx",
"uid": "xxx",
"token": "xxx",
"client": "android",
"deviceId": "xxx--xxxx--xxxx",
"encrypt": "1",
"timestamp": "xxx",
"version": "3.0.0",
"branchNo": "0",
"fundAccount": "xxx",
}
def sort_map():
a = ""
for i in sorted(body):
a = a + i + body[i]
return a
def get_md5():
str_data = sort_map()
sort_string = "xxxkey联系1198287349" + str_data + "xxxkey联系1198287349"
up_string = sort_string.upper()
md5_string = hashlib.md5(up_string.encode(encoding='UTF-8')).hexdigest()
print(md5_string.center(50, "-"))
return md5_string
if __name__ == '__main__':
get_md5()