repo.or.cz
/
tomato.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libsodium: Needed for Dnscrypto-proxy Release 1.3.0
[tomato.git]
/
release
/
src
/
router
/
libsodium
/
src
/
libsodium
/
sodium
/
core.c
blob
654b1ec80c5414cffbf02a9f3a89bb09dacc07fc
1
2
#include <stdbool.h>
3
4
#include
"core.h"
5
#include
"crypto_onetimeauth.h"
6
#include
"randombytes.h"
7
8
static bool
initialized
;
9
10
int
11
sodium_init
(
void
)
12
{
13
if
(
initialized
!=
0
) {
14
return
1
;
15
}
16
if
(
crypto_onetimeauth_pick_best_implementation
() ==
NULL
) {
17
return
-
1
;
18
}
19
randombytes_stir
();
20
initialized
=
1
;
21
22
return
0
;
23
}