tuweni / org.apache.tuweni.crypto.sodium / Sodium

Sodium

class Sodium (source)

Access to the sodium native library.

This class provides static methods for checking or loading the sodium native library.

Functions

isAvailable

Check if the sodium library is available.

static fun isAvailable(): Boolean

loadLibrary

Load and initialize the native libsodium shared library.

static fun loadLibrary(path: Path!): Unit

minSupportedVersion

The minimum version of the sodium native library that this binding supports.

static fun minSupportedVersion(): SodiumVersion!

searchLibrary

Search for, then load and initialize the native libsodium shared library.

static fun searchLibrary(vararg paths: Path!): Unit
static fun searchLibrary(libraryName: String!, vararg paths: Path!): Unit

supportsVersion

Check if the loaded sodium native library is the same or later than the specified version.

static fun supportsVersion(requiredVersion: SodiumVersion!): Boolean

version

The version of the loaded sodium native library.

static fun version(): SodiumVersion!