init static method

Future<Sodium> init(
  1. dynamic libsodium, {
  2. @Deprecated('initNative is deprecated and will be ignored.') bool initNative = true,
})

Creates a Sodium instance for the loaded libsodium.

The libsodium parameter must be a loaded [lib]sodium.[so|dll|dylib|a|lib|js]- depending on your platform. Please refer to the README for more details on loading the library.

Implementation

static Future<Sodium> init(
  dynamic libsodium, {
  @Deprecated('initNative is deprecated and will be ignored.')
      bool initNative = true,
}) =>
    initFromSodiumJS(libsodium as LibSodiumJS);