取消签名罐子的签名 [英] Unsigning a signed jar
问题描述
我正在使用充气城堡提供程序进行AES加密.我需要从不列颠哥伦比亚省和我的罐子创建一个胖罐子,但是一旦我这样做,我就会发现算法未发现异常.是否有可能摆脱该标志并从中创建常规罐子?
I am using bouncy castle provider for AES encryption. I need to create a fat jar from bc and my jar but as soon as i do it i get Algorithm not found exception. Is it possible to get rid of the sign and create regular jar out of it?
我的构建过程是..
- 我将所有jar都解压缩到我的构建目录中.
- 然后删除META-INF目录
- 编译我的应用程序
- 使用ant
当我尝试使用
SecretKeyFactory.getInstance(algorithm);
SecretKeyFactory.getInstance(algorithm);
算法是充气城堡中的PBEWITHSHA256AND128BITAES-CBC-BC.
algorithm is PBEWITHSHA256AND128BITAES-CBC-BC from bouncy castle.
推荐答案
要从jar文件中删除签名,请从其中删除META-INF
目录. jar文件是zip文件,因此在Linux上,您可以执行以下操作:
To remove the signature from a jar file, remove the META-INF
directory from it. A jar file is a zip file so on Linux you can do this:
zip -d file.jar 'META-INF/*.SF' 'META-INF/*.RSA'
这篇关于取消签名罐子的签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!