xref: /freebsd/crypto/libecc/src/utils/utils_rand.h (revision f0865ec9906d5a18fa2a3b61381f22ce16e606ad)
1 /*
2  *  Copyright (C) 2023 - This file is part of libecc project
3  *
4  *  Authors:
5  *      Ryad BENADJILA <ryadbenadjila@gmail.com>
6  *      Arnaud EBALARD <arnaud.ebalard@ssi.gouv.fr>
7  *
8  *  This software is licensed under a dual BSD and GPL v2 license.
9  *  See LICENSE file at the root folder of the project.
10  */
11 #ifndef __UTILS_RAND_H__
12 #define __UTILS_RAND_H__
13 
14 #include <libecc/words/words.h>
15 #include "../external_deps/rand.h"
16 
17 /* WARNING: use with care, this is useful when "fast" but somehow unsafe
18  * random must be provided.
19  */
20 ATTRIBUTE_WARN_UNUSED_RET int get_unsafe_random(unsigned char *buf, u16 len);
21 
22 #endif /* __UTILS_RAND_H__ */
23