Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
fmp_vip
Commits
ad65ec10
Commit
ad65ec10
authored
Aug 01, 2018
by
戴尚尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改验签规则为所有字段参与Md5计算
parent
2c502aad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
fmvip/task/fmtask.cpp
+9
-0
No files found.
fmvip/task/fmtask.cpp
View file @
ad65ec10
...
...
@@ -194,6 +194,7 @@ QJsonValue FMTask::getPosJsonValue(const QString prop)
QString
FMTask
::
sign
()
const
{
FMP_DEBUG
()
<<
__FUNCTION__
;
/*
// 解析JSON插入MAP中按字典排序
QMap<QString, QString> mapData;
...
...
@@ -227,6 +228,14 @@ QString FMTask::sign() const
QByteArray md5Bt = QCryptographicHash::hash(bt, QCryptographicHash::Md5);
return md5Bt.toHex();
*/
// 会员2.0验签规格修改为所有字段排序MD5
QJsonDocument
json
(
serverReqJsonObj
);
QByteArray
data
=
json
.
toJson
(
QJsonDocument
::
Compact
);
data
.
append
(
KEY_CODE
);
FMP_INFO
()
<<
"Sign String: "
<<
data
;
QByteArray
md5Bt
=
QCryptographicHash
::
hash
(
data
,
QCryptographicHash
::
Md5
);
return
md5Bt
.
toHex
();
}
QByteArray
FMTask
::
JsonObjToMap
(
const
QJsonObject
&
jsonObj
,
QString
parentJson
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment