Package org.apache.commons.crypto.jna
Class OpenSslJna
- java.lang.Object
-
- org.apache.commons.crypto.jna.OpenSslJna
-
public final class OpenSslJna extends java.lang.Object
Provides access to package protected class objects and amain(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.
-
-
-
Field Detail
-
KEY_DEBUG
private static final java.lang.String KEY_DEBUG
- See Also:
- Constant Field Values
-
-
Method Detail
-
debug
static void debug(java.lang.Object format, java.lang.Object... args)
Logs debug messages.- Parameters:
format
- SeeString.format(String, Object...)
.args
- SeeString.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
- SeeString.format(String, Object...)
.args
- SeeString.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.
-
-