This article is a big sandbox based on the notes I took during my test of the sodium Dart package, an implementation of the libsodium (a well known C cryptographic library), itself coming from a fork of NaCl . libsodium was ported on many languages like javascript , rust , go , ocaml , haskell , erlang , elixir and many others.
sodium implementation tries to be a 1:1 interface to libsodium but with the object oriented paradigm in mind and the specificity of the Dart language. In fact, the few examples present in the source code and the documentation looks limited to me, and did not answer my questions. The test suite is huge, and a big part of the following code will be inherited from it, to avoid you, dear readers, to do the same annoying task. sodium can simply be installed using the dart pub add sodium command in your current project.
$ dart pub add sodium Resolving dependencies... Downloading packages...…