当前位置:网站首页>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
边栏推荐
- Linux modify MySQL database password
- What is the difference between NFT and digital collection?
- 【windows】--- SQL Server 2008 超详细安装教程
- [JVM Loading]---Class Loading Mechanism
- 工件SSMwar exploded 部署工件时出错。请参阅服务器日志了解详细信息
- NFTs: The Heart of Digital Ownership
- 【Elastic-Job源码分析】——作业监听器
- Take you to understand the MySQL isolation level, what happens when two transactions operate on the same row of data at the same time?
- 使用ps | egrep时过滤排除掉egrep自身
- 对于输出点是时间戳的渗透测试方法(以Oracle数据库为例)
猜你喜欢
随机推荐
Detailed explanation of pointers in C language
GUCCI, LV and other luxury giant universe how to layout yuan, other brands should keep up with?
数据库 | SQL增删改查基础语法
C language tutorial (3) - if and loop
数字取证autopsy工具用法
C语言 | 获取字符串里逗号间隔的内容
The latest MySql installation teaching, very detailed
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
【Elastic-Job】分布式调度任务概览篇
Digital twins will be an important way to enter the "metaverse"
C language tutorial (2) - printf and data types that come with c
【windows】--- SQL Server 2008 超详细安装教程
阿里云中mysql数据库被攻击了,最终数据找回来了
Yuan prospect and four track of the universe
[Cloud native] Open source data analysis SPL easily copes with T+0
【云原生】原来2020.0.X版本开始的OpenFeign底层不再使用Ribbon了
MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
小米手机短信定位服务激活失败
动态规划(一)| 斐波那契数列和归递
configure:error no SDL library found








