Commit cb967bce by 刘帅

Hex格式输出请求加密后数据

parent 7b0a7468
......@@ -35,6 +35,7 @@ int main(int argc, char *argv[])
FPE::SetMy(TRUE);
std::string rData = FPE::ReadDate((char*)filePath.toStdString().c_str());
OutputDebugStringA(rData.c_str());
if(!VerifySign(filePath.toStdString(), rData))
{
......
......@@ -864,6 +864,7 @@ int QFmClient::sendAESData2Proxy(int sock, char *buf, int length)
memcpy(out, &header, header_size);
toSendLength = toSendLength + header_size;
//outputHex(out, toSendLength);
int curSendLength = 0;
int rlt = 0;
while(curSendLength < toSendLength)
......@@ -888,6 +889,17 @@ int QFmClient::sendAESData2Proxy(int sock, char *buf, int length)
return rlt;
}
void QFmClient::outputHex(char* out, int length)
{
FILE* stream;
stream = fopen("hex.txt", "w");
for(int i = 0; i < length; i++)
{
fprintf(stream, "%02x ", (unsigned char)(out[i]));
}
fclose(stream);
}
int QFmClient::recvAESDataFromProxy(int sock, char *buf, int maxBufferLength)
{
#define MAX_RECV_LENGTH 40960
......
......@@ -67,7 +67,7 @@ public:
void BackupPosReq(char *req);
int sendAESData2Proxy(int sock, char *buf, int length);
int recvAESDataFromProxy(int sock, char *buf, int maxBufferLength);
void outputHex(char* out, int length);
public slots:
void SetTransactionId(QString fmId); //退款流程1, 从输入获取长码
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment