blob: 5d5ee9450c55f4b65c057bc10d426c1f2ff2d111 (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright (c) 2015-2018 Linaro Limited
* Copyright (c) 2022 Nokia
*/
/**
* @file
*
* ODP random number API
*/
#ifndef ODP_API_SPEC_RANDOM_TYPES_H_
#define ODP_API_SPEC_RANDOM_TYPES_H_
#include <odp/visibility_begin.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <odp/api/std_types.h>
/** @defgroup odp_random ODP RANDOM
* @{
*/
/**
* Random kind selector
*
* The kind of random denotes the statistical quality of the random data
* returned. Basic random simply appears uniformly distributed, Cryptographic
* random is statistically random and suitable for use by cryptographic
* functions. True random is generated from a hardware entropy source rather
* than an algorithm and is thus completely unpredictable. These form a
* hierarchy where higher quality data is presumably more costly to generate
* than lower quality data.
*/
typedef enum {
/** Basic random, presumably pseudo-random generated by SW. This
* is the lowest kind of random */
ODP_RANDOM_BASIC,
/** Cryptographic quality random */
ODP_RANDOM_CRYPTO,
/** True random, generated from a HW entropy source. This is the
* highest kind of random */
ODP_RANDOM_TRUE,
} odp_random_kind_t;
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#include <odp/visibility_end.h>
#endif
|