Basic demonstration of precedence : Bouncy Castle « Security « Java Tutorial






import javax.crypto.Cipher;

public class MainClass {
  public static void main(String[] args) throws Exception {
    Cipher cipher = Cipher.getInstance("Blowfish/ECB/NoPadding");

    System.out.println(cipher.getProvider());

    cipher = Cipher.getInstance("Blowfish/ECB/NoPadding", "BC");

    System.out.println(cipher.getProvider());
  }
}








36.6.Bouncy Castle
36.6.1.Basic class to confirm the Bouncy Castle provider is installed.
36.6.2.Basic demonstration of precedence