libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git] / release / src / router / libsodium / src / libsodium / sodium / core.c
blob654b1ec80c5414cffbf02a9f3a89bb09dacc07fc
2 #include <stdbool.h>
4 #include "core.h"
5 #include "crypto_onetimeauth.h"
6 #include "randombytes.h"
8 static bool initialized;
10 int
11 sodium_init(void)
13 if (initialized != 0) {
14 return 1;
16 if (crypto_onetimeauth_pick_best_implementation() == NULL) {
17 return -1;
19 randombytes_stir();
20 initialized = 1;
22 return 0;