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

searchLibrary

static fun searchLibrary(vararg paths: Path!): Unit (source)

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 "sodium". If this method returns successfully (without throwing a LinkageError), then all future calls to methods provided by this class will use the loaded library.

Parameters

paths - Path!: A set of directories to search for the library in.

Exceptions

LinkageError - If the library cannot be found, dependent libraries are missing, or cannot be initialized.

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

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.

Parameters

libraryName - String!: The name of the library (e.g. "sodium").

paths - Path!: A set of directories to search for the library in.

Exceptions

LinkageError - If the library cannot be found, dependent libraries are missing, or cannot be initialized.