public static boolean isSunJCE(Provider provider){
  Class<?> sunJCE=null;
  try {
    sunJCE=Class.forName("com.sun.crypto.provider.SunJCE");
  }
 catch (  Exception e) {
    return false;
  }
  if (sunJCE == null) {
    return false;
  }
  return sunJCE.isInstance(provider);
}

public static boolean isSunJCE ( Provider provider ) { Class < ? > sunJCE = null ; try { sunJCE = Class . forName ( "com.sun.crypto.provider.SunJCE" ) ; } catch ( Exception e ) { return false ; } if ( sunJCE == null ) { return false ; } return sunJCE . isInstance ( provider ) ; }
checks if the passed provider is an instance of " sun . security . mscapi . sunmscapi " .
