]> git.ipfire.org Git - thirdparty/hostap.git/blame - src/crypto/random.h
Remove the GPL notification from files contributed by Jouni Malinen
[thirdparty/hostap.git] / src / crypto / random.h
CommitLineData
3642c431
JM
1/*
2 * Random number generator
d47fa330 3 * Copyright (c) 2010-2011, Jouni Malinen <j@w1.fi>
3642c431 4 *
0f3d578e
JM
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
3642c431
JM
7 */
8
9#ifndef RANDOM_H
10#define RANDOM_H
11
bbb921da 12#ifdef CONFIG_NO_RANDOM_POOL
38e24575 13#define random_init(e) do { } while (0)
d47fa330 14#define random_deinit() do { } while (0)
bbb921da 15#define random_add_randomness(b, l) do { } while (0)
3642c431 16#define random_get_bytes(b, l) os_get_random((b), (l))
08704cd8
JM
17#define random_pool_ready() 1
18#define random_mark_pool_ready() do { } while (0)
bbb921da 19#else /* CONFIG_NO_RANDOM_POOL */
38e24575 20void random_init(const char *entropy_file);
d47fa330 21void random_deinit(void);
bbb921da
JM
22void random_add_randomness(const void *buf, size_t len);
23int random_get_bytes(void *buf, size_t len);
08704cd8
JM
24int random_pool_ready(void);
25void random_mark_pool_ready(void);
bbb921da 26#endif /* CONFIG_NO_RANDOM_POOL */
3642c431
JM
27
28#endif /* RANDOM_H */