Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmclientUi
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
shuai.liu
FmclientUi
Commits
c1dc8f8f
Commit
c1dc8f8f
authored
Jan 18, 2019
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更换密钥长度,添加版本信息
parent
2203ff59
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
7 deletions
+44
-7
FmclientUi.pro
+2
-0
qfmclient.cpp
+13
-7
resource.h
+29
-0
No files found.
FmclientUi.pro
View file @
c1dc8f8f
...
...
@@ -45,3 +45,5 @@ HEADERS += widget.h \
FORMS
+=
widget
.
ui
\
scanner
.
ui
RC_FILE
+=
version
.
rc
qfmclient.cpp
View file @
c1dc8f8f
...
...
@@ -27,6 +27,8 @@
#include <cassert>
#include <sstream>
const
char
EVP_KEY
[]
=
"wFLV2x3IWlkVRk5XaK4J1Kpo5cIlFPYS"
;
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "fmcrypt.lib")
//#pragma comment(lib, "DbgHelp.lib")
...
...
@@ -797,7 +799,7 @@ void QFmClient::BackupPosReq(char * req)
char
key
[
EVP_MAX_KEY_LENGTH
]
=
{
0
};
strcpy_s
(
key
,
EVP_MAX_KEY_LENGTH
,
"fmclient"
);
strcpy_s
(
key
,
EVP_MAX_KEY_LENGTH
,
EVP_KEY
);
int
length
=
strlen
(
req
);
char
*
out
=
new
char
[
length
+
64
];
...
...
@@ -829,7 +831,7 @@ int QFmClient::sendAESData2Proxy(int sock, char *buf, int length)
const
char
*
lpsendBuf
=
buf
;
char
key
[
EVP_MAX_KEY_LENGTH
]
=
{
0
};
strcpy_s
(
key
,
EVP_MAX_KEY_LENGTH
,
"fmclient"
);
strcpy_s
(
key
,
EVP_MAX_KEY_LENGTH
,
EVP_KEY
);
int
outl
=
length
+
(
16
-
length
%
16
);
size_t
header_size
=
sizeof
(
FMSOCKHEADER
);
...
...
@@ -961,7 +963,7 @@ int QFmClient::recvAESDataFromProxy(int sock, char *buf, int maxBufferLength)
char
key
[
EVP_MAX_KEY_LENGTH
];
strcpy_s
(
key
,
EVP_MAX_KEY_LENGTH
,
"fmclient"
);
strcpy_s
(
key
,
EVP_MAX_KEY_LENGTH
,
EVP_KEY
);
rlt
=
CEncrypt
::
AESDecode
((
unsigned
char
*
)
key
,
NULL
,
(
unsigned
char
*
)
lpRcvBuffer
,
rcvedLength
,
(
unsigned
char
*
)
lpRcvBuffer
,
rcvedLength
);
...
...
@@ -1046,7 +1048,9 @@ void QFmClient::run()
emit
ShowUi
();
}
if
(
reqtype
==
52
&&
(
!
object
.
contains
(
"fmId"
)
||
object
[
"fmId"
].
isNull
()))
{
if
(
reqtype
==
52
)
{
if
(
!
object
.
contains
(
"fmId"
)
||
object
[
"fmId"
].
isNull
())
{
emit
ShowRefundUi
();
QEventLoop
evt
;
QTimer
t
(
this
);
...
...
@@ -1055,12 +1059,14 @@ void QFmClient::run()
connect
(
this
,
SIGNAL
(
ContinueRefund
()),
&
evt
,
SLOT
(
quit
()));
evt
.
exec
();
object
[
"fmId"
]
=
_refundTransId
;
QLOG_ERROR
()
<<
"refund fmId: "
<<
_refundTransId
;
}
if
(
!
object
.
contains
(
"station_id"
))
{
//! 给到客户的文档中, 缺少 station_id 字段
object
[
"station_id"
]
=
"1"
;
}
QLOG_ERROR
()
<<
"refund fmId: "
<<
_refundTransId
;
}
}
if
(
0
!=
Try2ConnectZhProxy
())
{
...
...
@@ -1228,7 +1234,7 @@ void QFmClient::CheckRollBackData()
// ZH_decodeBkData(_codeBuf, _sendbuf, readLen);
char
key
[
EVP_MAX_KEY_LENGTH
];
strcpy_s
(
key
,
EVP_MAX_KEY_LENGTH
,
"fmclient"
);
strcpy_s
(
key
,
EVP_MAX_KEY_LENGTH
,
EVP_KEY
);
rlt
=
CEncrypt
::
AESDecode
((
unsigned
char
*
)
key
,
NULL
,
(
unsigned
char
*
)
_codeBuf
,
readLen
,
(
unsigned
char
*
)
_sendbuf
,
MAX_BUF_LEN
);
...
...
resource.h
0 → 100644
View file @
c1dc8f8f
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by version.rc
//
#define _USE_DECLSPECS_FOR_SAL 0
#define _USE_ATTRIBUTES_FOR_SAL 0
#define __drv_typeConst 0
#define __drv_typeCond 1
#define VS_VERSION_INFO 1
#define VFFF_ISSHAREDFILE 0x0001
#define VFF_CURNEDEST 0x0001
#define VIFF_FORCEINSTALL 0x0001
#define __drv_typeBitset 2
#define VFF_FILEINUSE 0x0002
#define VIFF_DONTDELETEOLD 0x0002
#define __drv_typeExpr 3
#define VFF_BUFFTOOSMALL 0x0004
#define VS_USER_DEFINED 100
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
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