Giter VIP home page Giter VIP logo

Comments (21)

mosentest avatar mosentest commented on May 24, 2024

java.lang.IllegalArgumentException (no error message)

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

看样子是某个字符串加密后长度超过65535了,详见ByteVector:

    public ByteVector putUTF8(final String s) {
        int charLength = s.length();
        if (charLength > 65535) {
            throw new IllegalArgumentException();
        }
        ...
    }

按照Base64算法,原字符串长度不应该超过65535*0.75

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

@MegatronKing 可能是吧,可是我换了另外一个工程编译,看了下,还行不能指定我的jar吧,感觉没效果,我是想加密我指定的jar,我在gradle构建自己的sdk

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

可以用fogPackages配置指定的包加密

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

@MegatronKing 我不是想指定包名,我想指定路径,可以吗,我打好的jar

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

这个目前做不到,加密步骤是在编译成字节码之后进行的,这个时候所有字节码都是放在build目录下面,已经没法知道jar的原始路径了

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

因为我也用gradle命令把class文件打成一个jar包
先是执行build->合成jar->dex,但是我发现用你这库的时候,build生成的class文件没有你的库代码

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

@MegatronKing

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

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.

mosentest avatar mosentest commented on May 24, 2024

我不知道你有没有编译jar

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

StringFog的原理同混淆类似,都是在transform里面做处理,能看到transformClassesWithStringFogForXXX的task。所以理论上不会影响你那边的task

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

你可能还没明白,我说构建 build的时候没有你jar的class代码生成出来呀

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

@MegatronKing

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

你可以试试gradlew build 看看

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

哪个没有生产出来呢,StringFog.class这个?

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

涉及到你这库的那几个类都没有 @MegatronKing

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

compile 'com.github.megatronking.stringfog:lib:1.2.2' 这个也没有? 这是正常的库依赖,不可能没有的,如果没有我只能是怀疑你gradle出问题了。

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

这个有呀,不知道为何build后没加上来,其他包是正常的 @MegatronKing

from stringfog.

mosentest avatar mosentest commented on May 24, 2024

方便的话,加下qq:709847739 我问下你

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

加我微信吧 king20091305035

from stringfog.

MegatronKing avatar MegatronKing commented on May 24, 2024

Fixed in 2.0.0

from stringfog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.