Impl DecryptImage
This commit is contained in:
parent
3b96b1737d
commit
d605dedf00
@ -27,7 +27,6 @@ extern UINT64 g_WeChatWinDllAddr;
|
|||||||
|
|
||||||
int IsLogin(void) { return (int)GET_UINT64(g_WeChatWinDllAddr + g_WxCalls.login); }
|
int IsLogin(void) { return (int)GET_UINT64(g_WeChatWinDllAddr + g_WxCalls.login); }
|
||||||
|
|
||||||
#if 0
|
|
||||||
static string get_key(uint8_t header1, uint8_t header2, uint8_t *key)
|
static string get_key(uint8_t header1, uint8_t header2, uint8_t *key)
|
||||||
{
|
{
|
||||||
// PNG?
|
// PNG?
|
||||||
@ -54,6 +53,7 @@ static string get_key(uint8_t header1, uint8_t header2, uint8_t *key)
|
|||||||
string DecryptImage(string src, string dir)
|
string DecryptImage(string src, string dir)
|
||||||
{
|
{
|
||||||
if (!fs::exists(src)) {
|
if (!fs::exists(src)) {
|
||||||
|
LOG_ERROR("File not exists: {}", src);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,6 +114,7 @@ string DecryptImage(string src, string dir)
|
|||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static int GetFirstPage()
|
static int GetFirstPage()
|
||||||
{
|
{
|
||||||
int rv = -1;
|
int rv = -1;
|
||||||
|
@ -716,6 +716,7 @@ bool func_refresh_qrcode(uint8_t *out, size_t *len)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool func_decrypt_image(DecPath dec, uint8_t *out, size_t *len)
|
bool func_decrypt_image(DecPath dec, uint8_t *out, size_t *len)
|
||||||
{
|
{
|
||||||
@ -742,6 +743,7 @@ bool func_decrypt_image(DecPath dec, uint8_t *out, size_t *len)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
bool func_exec_ocr(char *path, uint8_t *out, size_t *len)
|
bool func_exec_ocr(char *path, uint8_t *out, size_t *len)
|
||||||
{
|
{
|
||||||
Response rsp = Response_init_default;
|
Response rsp = Response_init_default;
|
||||||
@ -963,10 +965,12 @@ static bool dispatcher(uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len
|
|||||||
ret = func_refresh_qrcode(out, out_len);
|
ret = func_refresh_qrcode(out, out_len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
case Functions_FUNC_DECRYPT_IMAGE: {
|
case Functions_FUNC_DECRYPT_IMAGE: {
|
||||||
ret = func_decrypt_image(req.msg.dec, out, out_len);
|
ret = func_decrypt_image(req.msg.dec, out, out_len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
case Functions_FUNC_EXEC_OCR: {
|
case Functions_FUNC_EXEC_OCR: {
|
||||||
ret = func_exec_ocr(req.msg.str, out, out_len);
|
ret = func_exec_ocr(req.msg.str, out, out_len);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user