Comments (21)
java.lang.IllegalArgumentException (no error message)
from stringfog.
看样子是某个字符串加密后长度超过65535了,详见ByteVector:
public ByteVector putUTF8(final String s) {
int charLength = s.length();
if (charLength > 65535) {
throw new IllegalArgumentException();
}
...
}
按照Base64算法,原字符串长度不应该超过65535*0.75
from stringfog.
@MegatronKing 可能是吧,可是我换了另外一个工程编译,看了下,还行不能指定我的jar吧,感觉没效果,我是想加密我指定的jar,我在gradle构建自己的sdk
from stringfog.
可以用fogPackages配置指定的包加密
from stringfog.
@MegatronKing 我不是想指定包名,我想指定路径,可以吗,我打好的jar
from stringfog.
这个目前做不到,加密步骤是在编译成字节码之后进行的,这个时候所有字节码都是放在build目录下面,已经没法知道jar的原始路径了
from stringfog.
因为我也用gradle命令把class文件打成一个jar包
先是执行build->合成jar->dex,但是我发现用你这库的时候,build生成的class文件没有你的库代码
from stringfog.
from stringfog.
task xxxx(type: Jar, dependsOn: ['build']) {
appendix = ""
baseName = "xxx"
version = ""
classifier = ""
//后缀名
extension = "jar"
//jar包输出路径
destinationDir = file('build/jar') //
//需打包的资源所在的路径集
def srcClassDir = ["build/intermediates/classes/release"];
//初始化资源路径集
from srcClassDir
//添加依赖的jar文件,zipTree为了解压文件
from(project.zipTree("libs/test_sdk.jar"))
//from(project.zipTree("libs/Android_Map3D_SDK_V6.1.0_20180330.jar"))
//去除路径集下部分的资源,合并其他的包,可能依赖R文件,因此要明确点这里
exclude "com/android/google//BuildConfig.class"
exclude "com/android/google//R.class"
exclude "com/android/google//R$*.class"
//只导入资源路径集下的部分资源,这句话,导致其他包,没办法引入进来,所以要注释
//include "com/android/google/code//*.class"
}
from stringfog.
我不知道你有没有编译jar
from stringfog.
StringFog的原理同混淆类似,都是在transform里面做处理,能看到transformClassesWithStringFogForXXX的task。所以理论上不会影响你那边的task
from stringfog.
你可能还没明白,我说构建 build的时候没有你jar的class代码生成出来呀
from stringfog.
from stringfog.
你可以试试gradlew build 看看
from stringfog.
哪个没有生产出来呢,StringFog.class这个?
from stringfog.
涉及到你这库的那几个类都没有 @MegatronKing
from stringfog.
compile 'com.github.megatronking.stringfog:lib:1.2.2' 这个也没有? 这是正常的库依赖,不可能没有的,如果没有我只能是怀疑你gradle出问题了。
from stringfog.
这个有呀,不知道为何build后没加上来,其他包是正常的 @MegatronKing
from stringfog.
方便的话,加下qq:709847739 我问下你
from stringfog.
加我微信吧 king20091305035
from stringfog.
Fixed in 2.0.0
from stringfog.
Related Issues (20)
- 请求扩展提供对已经编译好的Dex或者jar 文件进行字符串加密。 HOT 1
- 领袖 我用的5.0版本的,Gradle8.0, AGP 7.4 , 构建的时候提示Missing file HOT 1
- com.github.megatronking.stringfog.plugin.kg.RandomKeyGenerator 为啥导入不了 HOT 1
- 这是什么原因
- 5.0是对android studio 版本有什么要求吗
- 部分字段无法加密 HOT 1
- debug包正常,release包static String的变量初始值丢失问题 HOT 4
- JDK11 ArrayIndexOutOfBoundsException HOT 3
- gradle8.0以下问题 HOT 2
- How to decrypt?
- java 17 compileSdk 34 报错 HOT 2
- AGP7.1.3,按照主页的文档配置好,sync后报错如下
- 注解的字符串不会被加密
- build.gradle.kts DSL 怎么接入 HOT 1
- 5.1.0不能同时对app module和lib module同时加密 HOT 1
- 空字符加密
- 4.0.1+Gradle7.2.2 无法生成加密后的APK
- (PermittedSubclasses requires ASM9) - java 17 compileSdk 34 kotlin 1.9.20 agp 8.2.0, gradle-8.5
- 能否添加一个package的黑名单的功能
- kotlin 编码中,拼接的字符串没法进行加密
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stringfog.