you can add a security provider by editing java.security by adding security.provider. = org.bouncycastle.jce.provider.BouncyCastleProvider
or add a line to the top of your class
Security.addProvider(new BouncyCastleProvider());
you can use the bottom line to indicate the provider when specifying the algorithms
Cipher cipher = Cipher.getInstance("AES", "SunJCE");
if you use another provider, such as Bouncy Castle,
Cipher cipher = Cipher.getInstance("AES", "BC");
kapil das Oct. 15 '13 at 9:51 on 2013-10-15 09:51
source share