Use xoshiro256** to generate pseudo-random numbers.
[tinc] / src / digest.c
1 #include "digest.h"
2 #include "xalloc.h"
3
4 #ifndef DISABLE_LEGACY
5
6 digest_t *digest_alloc() {
7         return xzalloc(sizeof(digest_t));
8 }
9
10 void digest_free(digest_t **digest) {
11         if(digest && *digest) {
12                 digest_close(*digest);
13                 free(*digest);
14                 *digest = NULL;
15         }
16 }
17
18 #endif // DISABLE_LEGACY