取消签署已签名的jar [英] Un signing a signed jar
问题描述
我正在使用充气城堡提供商进行AES加密。我需要从bc和我的jar创建一个胖罐,但是一旦我这样做,我就会得到Algorithm not found例外。是否可以摆脱标志并创建常规罐?
我的构建过程是..
- 我将所有罐子解压缩到我的构建目录。
- 然后删除META-INF目录
- 编译我的应用程序
- jar使用ant
当我尝试使用
SecretKeyFactory.getInstance(算法);
算法是来自充气城堡的PBEWITHSHA256AND128BITAES-CBC-BC。
要从jar文件中删除签名,请从中删除 META-INF
目录它。 jar文件是一个zip文件,所以在Linux上你可以这样做:
zip -d file.jar'META-INF / * .SF''META-INF / * .RSA'
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?
My build process is..
- i unzip all jars in to my build directory.
- then remove META-INF directory
- compile my application
- jar it using ant
iget the error when i try to use the
SecretKeyFactory.getInstance(algorithm);
algorithm is PBEWITHSHA256AND128BITAES-CBC-BC from bouncy castle.
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'
这篇关于取消签署已签名的jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!