init static method

Future<SodiumSumo> init()

Creates a new SodiumSumo instance for the bundled libsodium.

This method will wait for sodium.js to load and then return the initialized instance. It will then check if the sodium.js that was loaded is actually a sumo variant and either return it or throw a SodiumSumoUnavailable exception.

Implementation

static Future<SodiumSumo> init() async =>
    initFromJS(await LibSodiumJSLoader.loadLibSodiumJS());