取消签署已签名的jar [英] Un signing a signed jar

查看:153
本文介绍了取消签署已签名的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆