class Sodium
(source)
Access to the sodium native library.
This class provides static methods for checking or loading the sodium native library.
static fun isAvailable(): Boolean
Check if the sodium library is available. If the sodium library has not already been loaded, this will attempt to load and initialize it before returning. |
|
static fun loadLibrary(path: Path): Unit
Load and initialize the native libsodium shared library. If this method returns successfully (without throwing a LinkageError), then all future calls to methods provided by this class will use the loaded library. |
|
static fun minSupportedVersion(): SodiumVersion
The minimum version of the sodium native library that this binding supports. |
|
static fun searchLibrary(vararg paths: Path): Unit
Search for, then load and initialize the native libsodium shared library. The library will be searched for in all the provided locations, using the library name static fun searchLibrary(libraryName: String, vararg paths: Path): Unit
Search for, then load and initialize the native libsodium shared library. The library will be searched for in all the provided locations, using the provided library name. If this method returns successfully (without throwing a LinkageError), then all future calls to methods provided by this class will use the loaded library. |
|
static fun supportsVersion(requiredVersion: SodiumVersion): Boolean
Check if the loaded sodium native library is the same or later than the specified version. |
|
static fun version(): SodiumVersion
The version of the loaded sodium native library. |