views:

177

answers:

1

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.

+1  A: 

When you sign a jar file, new files get added to the META-INF directory, e.g. "MKSIGN.SF" and "MKSIGN.DSA". Just remove them from the jar file (with any zip utility), and you have it unsigned.

Martin v. Löwis
I completely remove the META-INF directory still i get no algorithm exception
Hamza Yerlikaya