我正在混淆我的Java代码,我正在使用Proguard 5.2.1。然而,在使用GUI时,出现了一个警告:
ProGuard, version 5.2.1
Reading program jar [/root/Desktop/ACGPlain.jar]
Reading library jar [/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/rt.jar]
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey
Warning: connection.HttpURLClient: can't find referenced class javax.crypto.SecretKey
Warning: there were 5 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
(http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Please correct the above warnings first.
我试着用-dontwarn
选项在命令行上运行它,但模糊处理不起作用。我也尝试过以下几种:
java -jar proguard.jar -injar /root/Desktop/ACGPlain.jar -outjar /root/Desktop/ACGOB.jar -keepclass javax.crypto.SecretKey
有没有办法阻止proguard隐藏javax.crypto.SecretKey类?我正在寻找一个GUI解决方案,而不是通过配置文件。我的java代码不适用于android,是一个确保服务器和客户端之间传输安全的程序。
与加密相关的类位于不同的jar文件中。您需要将另一个-libraryjar
配置添加到您的配置文件中:
-libraryjar /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/jce.jar
另一种选择是忽略错误,因为它在您的情况下是无害的:
-ignorewarnings
或
-dontwarn javax.crypto.**