Class OpenSslJna


  • public final class OpenSslJna
    extends java.lang.Object
    Provides access to package protected class objects and a main(String[]) method that prints version information.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String KEY_DEBUG  
    • Constructor Summary

      Constructors 
      Constructor Description
      OpenSslJna()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void debug​(java.lang.Object format, java.lang.Object... args)
      Logs debug messages.
      static java.lang.Class<? extends CryptoCipher> getCipherClass()  
      static java.lang.Class<? extends CryptoRandom> getRandomClass()  
      private static void info​(java.lang.String format, java.lang.Object... args)
      Logs info-level messages.
      static java.lang.Throwable initialisationError()  
      static boolean isEnabled()  
      static void main​(java.lang.String[] args)  
      (package private) static java.lang.String OpenSSLVersion​(int type)
      Retrieves version/build information about OpenSSL library.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OpenSslJna

        public OpenSslJna()
    • Method Detail

      • debug

        static void debug​(java.lang.Object format,
                          java.lang.Object... args)
        Logs debug messages.
        Parameters:
        format - See String.format(String, Object...).
        args - See String.format(String, Object...).
      • getCipherClass

        public static java.lang.Class<? extends CryptoCipher> getCipherClass()
        Returns:
        The cipher class of JNA implementation
      • getRandomClass

        public static java.lang.Class<? extends CryptoRandom> getRandomClass()
        Returns:
        The random class of JNA implementation
      • info

        private static void info​(java.lang.String format,
                                 java.lang.Object... args)
        Logs info-level messages.
        Parameters:
        format - See String.format(String, Object...).
        args - See String.format(String, Object...).
      • initialisationError

        public static java.lang.Throwable initialisationError()
        Returns:
        the error of JNA
      • isEnabled

        public static boolean isEnabled()
        Returns:
        true if JNA native loads successfully
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Throwable
        Throws:
        java.lang.Throwable
      • OpenSSLVersion

        static java.lang.String OpenSSLVersion​(int type)
        Retrieves version/build information about OpenSSL library.
        Parameters:
        type - type can be OPENSSL_VERSION, OPENSSL_CFLAGS, OPENSSL_BUILT_ON...
        Returns:
        A pointer to a constant string describing the version of the OpenSSL library or giving information about the library build.