当前位置:网站首页>quick lua加密
quick lua加密
2022-07-31 05:15:00 【xuyid】
lua文件加密
./cocos luacompile -s src -d des_src -e -k key -b sign --disable-compile
图片资源加密
pack_files.sh -i res -o compile_res -ek key -es sign
在AppDelegate.cpp文件加入
stack->setXXTEAKeyAndSign("key", strlen("key"), "sign", strlen("sign"));
找到CCImage.ccp这个类,导入HelperFunc头文件
#include "extra/apptools/HelperFunc.h"
xcode报错,提示HelperFunc.h找不到,在xcode的cocos2d_libs的Header search Paths 加入HelperFunc.h的路径3.6是$(SRCROOT)/../cocos/quick_libs/src
android报错,提示HelperFunc.h找不到,在frameworks/cocos2d-x/cocos/Android.mk的LOCAL_EXPORT_C_INCLUDES :=和LOCAL_C_INCLUDES :=后面加入$(LOCAL_PATH)/quick_libs/src \
修改HelperFunc.cpp
#define LUASTACK_USED_FOR_QUICK_COCOS2DX 1
int xxteaKeyLen = stack->getXXTEAKeyLen();
const char *xxteaKey = stack->getXXTEAKey();
int xxteaSignLen = stack->getXXTEASignLen();
const char *xxteaSign = stack->getXXTEASign();
在CCluaStack.h类加入
int getXXTEAKeyLen(){return _xxteaKeyLen;};
int getXXTEASignLen(){return _xxteaSignLen;};
const char *getXXTEAKey(){return _xxteaKey;};
const char *getXXTEASign(){return _xxteaSign;};
修改CCImage.cpp的509行
// Data data = FileUtils::getInstance()->getDataFromFile(_filePath);
Data data = HelperFunc::getData(_filePath);
解决png过滤问题
1、在pack_files.php添加一行命令
array('pt', 'pattern', 1, null, 'regexp pattern'),
2、quick\FilesPacker.php的prepareForPack 211行添加
if($this->config['pattern'] != null && !preg_match($this->config['pattern'], $path))
{
#echo $path;
continue;
}
3、在build_native.bat添加,也就是-pt /\.png$/命令
%QUICK_COCOS2DX_ROOT%\bin\pack_files.sh -i "%APP_ANDROID_ROOT%assets/res" -o "%APP_ANDROID_ROOT%assets/res" -pt /\.png$/ -ek XXTEA -es tsts
边栏推荐
- vulhub靶场学习日记hackme2
- Take you to understand the MySQL isolation level, what happens when two transactions operate on the same row of data at the same time?
- 阿里云中mysql数据库被攻击了,最终数据找回来了
- Linux modify MySQL database password
- Access数据库的查询
- Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
- Access database query
- Volatility取证工具使用日记
- 一文速学-玩转MySQL获取时间、格式转换各类操作方法详解
- 数据库 | SQL查询进阶语法
猜你喜欢

MySql to create data tables

feign调用不通问题,JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r

碎片化NFT(Fractional NFT)

Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘

this指向问题

Year-end summary - the years are quiet~

【uiautomation】微信好友列表获取(存储到txt中)

MySQL高级学习笔记

年终总结——岁月静好~

Hyper-V新建虚拟机注意事项
随机推荐
Year-end summary - the years are quiet~
quick-3.5 ActionTimeline的setLastFrameCallFunc调用会崩溃问题
mac10.14中安装mysqldb
npm WARN config global `--global`, `--local` are deprecated. Use `--location solution
腾讯云GPU桌面服务器驱动安装
PHP中abstract(抽象)、final(最终)和static(静态)原理与用法
【Elastic-Job源码分析】——作业监听器
js中的全局作用域与函数作用域
Access数据库的查询
通信原理——纠错编码 | 汉明码(海明码)手算详解
Linux修改MySQL数据库密码
js中流程控制语句
计网 Packet Tracer仿真 | 简单易懂集线器和交换机对比(理论+仿真)
MySQL高级学习笔记
Attribute Changer的几种形态
MySql创建数据表
powershell统计文件夹大小
About integrating superset into your own project
【windows】--- SQL Server 2008 超详细安装教程
著名网站msdn.itellyou.cn原理分析