1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/DaYa_White-grpc

В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
WxQrcode.cpp 2 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Daya Отправлено 29.12.2018 07:46 7be8839
#include "WxQrcode.h"
//#include <Common/json/json.h>
#include "json/json.h"
//#include <Common/CryptUtil.h>
#include "base64.h"
CWxQrcode::CWxQrcode()
{
}
CWxQrcode::~CWxQrcode()
{
}
bool CWxQrcode::ParseQrcode(const std::string& strJson, CWxQrcode& result)
{
//Json::Reader reader;
//Json::Value root;
//if (!reader.parse(strJson.c_str(),strJson.c_str()+strJson.length(), root, false))
//{
// return false;
//}
//result._CheckTime = root["CheckTime"].asInt();
//result._Status = root["Status"].asInt();
//result._Username = root["Username"].asCString();
//result._Password = root["Password"].asCString();
//result._HeadImgUrl = root["HeadImgUrl"].asCString();
//result._Nickname = root["Nickname"].asCString();
//result._ExpiredTime = root["ExpiredTime"].asInt();
//result._Uuid = root["Uuid"].asCString();
//{
// if (root["ImgBuf"].isString())
// {
// const char* pQRCode = root["ImgBuf"].asCString();
// //base64 解密
// std::string strbase64Decode;
// //CCryptUtil::Base64Decoder((const byte*)pQRCode, strlen(pQRCode), strbase64Decode);
// strbase64Decode = base64_decode(pQRCode);
// result._ImgBuf.resize(strbase64Decode.length());
// memcpy((void*)result._ImgBuf.c_str(), strbase64Decode.c_str(), strbase64Decode.length());
// }
//}
//{
// if (root["NotifyKey"].isString())
// {
// const char* pQRCode = root["NotifyKey"].asCString();
// //base64 解密
// std::string strbase64Decode;
// strbase64Decode = base64_decode(pQRCode);
// result._NotifyKey.resize(strbase64Decode.length());
// memcpy((void*)result._NotifyKey.c_str(), strbase64Decode.c_str(), strbase64Decode.length());
// }
//
//}
//{
// if (root["RandomKey"].isString())
// {
// const char* pQRCode = root["RandomKey"].asCString();
// //base64 解密
// std::string strbase64Decode;
// strbase64Decode = base64_decode(pQRCode);
// result._RandomKey.resize(strbase64Decode.length());
// memcpy((void*)result._RandomKey.c_str(), strbase64Decode.c_str(), strbase64Decode.length());
// }
//
//}
return true;
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/DaYa_White-grpc.git
git@api.gitlife.ru:oschina-mirror/DaYa_White-grpc.git
oschina-mirror
DaYa_White-grpc
DaYa_White-grpc
master