Class BouncyCastleUtil


  • public final class BouncyCastleUtil
    extends Object
    Contains methods that can be used to detect if BouncyCastle is available.
    • Method Detail

      • isBcProvAvailable

        public static boolean isBcProvAvailable()
        Indicate whether the BouncyCastle Java Crypto Extensions provider is available.
      • isBcPkixAvailable

        public static boolean isBcPkixAvailable()
        Indicate whether the BouncyCastle Public-Key Infrastructure utilities are available.
      • isBcTlsAvailable

        public static boolean isBcTlsAvailable()
        Indicate whether the BouncyCastle Java Secure Socket Extensions provider is available.
      • unavailabilityCauseBcProv

        public static Throwable unavailabilityCauseBcProv()
        Returns:
        the cause if unavailable. null if available.
      • unavailabilityCauseBcPkix

        public static Throwable unavailabilityCauseBcPkix()
        Returns:
        the cause if unavailable. null if available.
      • unavailabilityCauseBcTls

        public static Throwable unavailabilityCauseBcTls()
        Returns:
        the cause if unavailable. null if available.
      • isBcJsseInUse

        public static boolean isBcJsseInUse​(SSLEngine engine)
        Indicates whether the given SSLEngine is implemented by BouncyCastle.
      • getBcProviderJce

        public static Provider getBcProviderJce()
        Get the BouncyCastle Java Crypto Extensions provider, or throw an exception if it is unavailable.
      • getBcProviderJsse

        public static Provider getBcProviderJsse()
        Get the BouncyCastle Java Secure Socket Extensions provider, or throw an exception if it is unavailable.