1 #ifndef _IPXE_NULL_ENTROPY_H
2 #define _IPXE_NULL_ENTROPY_H
6 * Nonexistent entropy source
8 * This source provides no entropy and must NOT be used in a
9 * security-sensitive environment.
12 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
17 #define ENTROPY_PREFIX_null
19 #define ENTROPY_PREFIX_null __null_
22 static inline __always_inline int
23 ENTROPY_INLINE ( null, entropy_enable ) ( void ) {
28 static inline __always_inline void
29 ENTROPY_INLINE ( null, entropy_disable ) ( void ) {
33 static inline __always_inline double
34 ENTROPY_INLINE ( null, min_entropy_per_sample ) ( void ) {
35 /* Actual amount of min-entropy is zero. To avoid
36 * division-by-zero errors and to allow compilation of
37 * entropy-consuming code, pretend to have 1 bit of entropy in
43 static inline __always_inline int
44 ENTROPY_INLINE ( null, get_noise ) ( noise_sample_t *noise ) {
46 /* All sample values are constant */
52 #endif /* _IPXE_NULL_ENTROPY_H */