Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sbkpay
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
sbkpay
Commits
5883851a
Commit
5883851a
authored
Oct 12, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 整合onedatabase分支 [
36666963
] 代码。
parent
34af0b6b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
sbkpay/DataProcess/dataprocess.h
+4
-0
sbkpay/DataProcess/rollback.cpp
+3
-1
sbkpay/control.cpp
+7
-4
No files found.
sbkpay/DataProcess/dataprocess.h
View file @
5883851a
...
@@ -255,6 +255,10 @@ public:
...
@@ -255,6 +255,10 @@ public:
qDebug
()
<<
sha1
;
qDebug
()
<<
sha1
;
QByteArray
array
(
sha1
);
qDebug
()
<<
array
.
toBase64
();
EVP_CIPHER_CTX_init
(
&
ctx
);
EVP_CIPHER_CTX_init
(
&
ctx
);
EVP_EncryptInit_ex
(
&
ctx
,
EVP_aes_256_cbc
(),
NULL
,
(
const
unsigned
char
*
)
sha1
,
(
const
unsigned
char
*
)
tmpiv
);
EVP_EncryptInit_ex
(
&
ctx
,
EVP_aes_256_cbc
(),
NULL
,
(
const
unsigned
char
*
)
sha1
,
(
const
unsigned
char
*
)
tmpiv
);
if
(
!
EVP_EncryptUpdate
(
&
ctx
,
(
unsigned
char
*
)
tmp
,
&
iOutLen
,
(
const
unsigned
char
*
)
in
,
inlen
))
if
(
!
EVP_EncryptUpdate
(
&
ctx
,
(
unsigned
char
*
)
tmp
,
&
iOutLen
,
(
const
unsigned
char
*
)
in
,
inlen
))
...
...
sbkpay/DataProcess/rollback.cpp
View file @
5883851a
...
@@ -58,7 +58,9 @@ void RollBack::RollWiteQuery(QSqlDatabase &_db, QSqlQuery &query)
...
@@ -58,7 +58,9 @@ void RollBack::RollWiteQuery(QSqlDatabase &_db, QSqlQuery &query)
json
[
JSON_KEY_REQTYPE
]
=
3
;
json
[
JSON_KEY_REQTYPE
]
=
3
;
json
[
JSON_KEY_VER
]
=
DEFAULT_JSON_VER_VALUE
;
json
[
JSON_KEY_VER
]
=
DEFAULT_JSON_VER_VALUE
;
QString
iv
=
json
[
JSON_KEY_RPARTNERID
].
toString
()
+
json
[
JSON_KEY_RSTOREID
].
toString
()
+
json
[
JSON_KEY_RSTATIONID
].
toString
();
QString
iv
=
QString
::
number
(
json
[
JSON_KEY_RPARTNERID
].
toInt
())
+
json
[
JSON_KEY_RSTOREID
].
toString
()
+
json
[
JSON_KEY_RSTATIONID
].
toString
();
QLOG_INFO
()
<<
"iv : "
<<
iv
;
if
(
!
CretOperate
::
GetSign
(
json
,
iv
))
if
(
!
CretOperate
::
GetSign
(
json
,
iv
))
{
{
...
...
sbkpay/control.cpp
View file @
5883851a
...
@@ -187,7 +187,8 @@ void Control::InitModel()
...
@@ -187,7 +187,8 @@ void Control::InitModel()
bool
Control
::
SendMessageToServer
(
const
QJsonObject
&
json
,
QByteArray
&
outdata
,
QString
&
error
)
bool
Control
::
SendMessageToServer
(
const
QJsonObject
&
json
,
QByteArray
&
outdata
,
QString
&
error
)
{
{
QString
iv
=
json
[
JSON_KEY_PARTNERID
].
toString
()
+
json
[
JSON_KEY_STOREID
].
toString
()
+
json
[
JSON_KEY_STATIONID
].
toString
();
QString
iv
=
QString
::
number
(
json
[
JSON_KEY_PARTNERID
].
toInt
())
+
json
[
JSON_KEY_STOREID
].
toString
()
+
json
[
JSON_KEY_STATIONID
].
toString
();
QLOG_INFO
()
<<
"iv : "
<<
iv
;
QJsonObject
tmpjson
=
json
;
QJsonObject
tmpjson
=
json
;
tmpjson
[
JSON_KEY_VER
]
=
DEFAULT_JSON_VER_VALUE
;
tmpjson
[
JSON_KEY_VER
]
=
DEFAULT_JSON_VER_VALUE
;
CretOperate
::
GetMAC
(
tmpjson
);
CretOperate
::
GetMAC
(
tmpjson
);
...
@@ -473,8 +474,8 @@ bool Control::GetRSA(QString &error)
...
@@ -473,8 +474,8 @@ bool Control::GetRSA(QString &error)
json
.
insert
(
JSON_KEY_STOREID
,
FMTool
::
GetJsonValue
(
_posReqJsonObj
,
JSON_KEY_STOREID
).
toString
());
json
.
insert
(
JSON_KEY_STOREID
,
FMTool
::
GetJsonValue
(
_posReqJsonObj
,
JSON_KEY_STOREID
).
toString
());
json
.
insert
(
JSON_KEY_STATIONID
,
FMTool
::
GetJsonValue
(
_posReqJsonObj
,
JSON_KEY_STATIONID
).
toString
());
json
.
insert
(
JSON_KEY_STATIONID
,
FMTool
::
GetJsonValue
(
_posReqJsonObj
,
JSON_KEY_STATIONID
).
toString
());
json
.
insert
(
JSON_KEY_PARTNERID
,
FMTool
::
GetJsonValue
(
_posReqJsonObj
,
JSON_KEY_PARTNERID
).
toInt
());
json
.
insert
(
JSON_KEY_PARTNERID
,
FMTool
::
GetJsonValue
(
_posReqJsonObj
,
JSON_KEY_PARTNERID
).
toInt
());
// iv = FMTool::GetString(_request.PlatNo, 4) + FMTool::GetString(_request.StoreNo, 20) + FMTool::GetString(_request.DeviceNo, 6);
iv
=
FMTool
::
GetString
(
_request
.
PlatNo
,
4
)
+
FMTool
::
GetString
(
_request
.
StoreNo
,
20
)
+
FMTool
::
GetString
(
_request
.
DeviceNo
,
6
);
iv
=
QString
::
number
(
FMTool
::
GetJsonValue
(
_posReqJsonObj
,
JSON_KEY_PARTNERID
).
toInt
())
+
FMTool
::
GetJsonValue
(
_posReqJsonObj
,
JSON_KEY_STOREID
).
toString
()
+
FMTool
::
GetJsonValue
(
_posReqJsonObj
,
JSON_KEY_STATIONID
).
toString
(
);
QLOG_INFO
()
<<
"get iv : "
<<
iv
;
QLOG_INFO
()
<<
"get iv : "
<<
iv
;
...
@@ -606,7 +607,9 @@ void Control::Request(ReqType type, QStringList list)
...
@@ -606,7 +607,9 @@ void Control::Request(ReqType type, QStringList list)
QByteArray
tmparray
;
QByteArray
tmparray
;
QString
tmperror
;
QString
tmperror
;
QString
iv
=
json
[
JSON_KEY_PARTNERID
].
toString
()
+
json
[
JSON_KEY_STOREID
].
toString
()
+
json
[
JSON_KEY_STATIONID
].
toString
();
QString
iv
=
QString
::
number
(
json
[
JSON_KEY_PARTNERID
].
toInt
())
+
json
[
JSON_KEY_STOREID
].
toString
()
+
json
[
JSON_KEY_STATIONID
].
toString
();
QLOG_INFO
()
<<
"iv : "
<<
iv
;
QJsonObject
tmpjson
=
json
;
QJsonObject
tmpjson
=
json
;
tmpjson
[
JSON_KEY_VER
]
=
DEFAULT_JSON_VER_VALUE
;
tmpjson
[
JSON_KEY_VER
]
=
DEFAULT_JSON_VER_VALUE
;
...
...
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