summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/crypto_libinit.c
blob: a4358d0d61036d422667c7f126f316b475683a40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <assert.h>

static	int		initialized = 0;

/*
 * Initialize the crypto library.
 */

int cryptoint_initialize_library (void)
{
	
	if (!initialized) {
		initialized = 1;
	}
	
	return 0;
}

/*
 * Clean up the crypto library state
 */

void cryptoint_cleanup_library (void)
{
	assert (initialized);
	
	prng_cleanup ();
	
	initialized = 0;
}