Skip to main content

Posts

Showing posts from February, 2013

SecurityException with Bouncy Castle

I am using BouncyCastle library to encrypt the data transfer with Kakfa. While my program run fine from IntelliJ, but when I package a fat JAR and run, it throws following exception: java.lang.SecurityException: JCE cannot authenticate the provider BC at javax.crypto.Cipher.getInstance(Cipher.java:657) at javax.crypto.Cipher.getInstance(Cipher.java:596) at com.xyz.abc.fusioncell.utils.CryptoService$class.decrypt(CryptoService.scala:63) at com.xyz.abc.fusioncell.Boot$.decrypt(Boot.scala:13) at com.xyz.abc.fusioncell.conf.Config$$anonfun$userId$1.apply(Config.scala:28) at com.xyz.abc.fusioncell.conf.Config$$anonfun$userId$1.apply(Config.scala:28) at scala.util.Try$.apply(Try.scala:192) at com.xyz.abc.fusioncell.conf.Config$class.userId(Config.scala:28) at com.xyz.abc.fusioncell.Boot$.userId$lzycompute(Boot.scala:13) at com.xyz.abc.fusioncell.Boot$.userId(Boot.scala:13) at com.xyz.abc.fusioncell.Boot$.main(Boot.scala:24) at com.xyz.abc.fu