iPXE
|
Nonexistent entropy source. More...
#include <stdint.h>
Go to the source code of this file.
Defines | |
#define | ENTROPY_PREFIX_null __null_ |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static __always_inline int | ENTROPY_INLINE (null, entropy_enable)(void) |
static __always_inline void | ENTROPY_INLINE (null, entropy_disable)(void) |
static __always_inline min_entropy_t | ENTROPY_INLINE (null, min_entropy_per_sample)(void) |
static __always_inline int | ENTROPY_INLINE (null, get_noise)(noise_sample_t *noise) |
Nonexistent entropy source.
This source provides no entropy and must NOT be used in a security-sensitive environment.
Definition in file null_entropy.h.
#define ENTROPY_PREFIX_null __null_ |
Definition at line 19 of file null_entropy.h.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
static __always_inline int ENTROPY_INLINE | ( | null | , |
entropy_enable | |||
) | [inline, static] |
Definition at line 23 of file null_entropy.h.
{ /* Do nothing */ return 0; }
static __always_inline void ENTROPY_INLINE | ( | null | , |
entropy_disable | |||
) | [inline, static] |
Definition at line 29 of file null_entropy.h.
{
/* Do nothing */
}
static __always_inline min_entropy_t ENTROPY_INLINE | ( | null | , |
min_entropy_per_sample | |||
) | [inline, static] |
Definition at line 34 of file null_entropy.h.
References MIN_ENTROPY.
{ /* Actual amount of min-entropy is zero. To avoid * division-by-zero errors and to allow compilation of * entropy-consuming code, pretend to have 1 bit of entropy in * each sample. */ return MIN_ENTROPY ( 1.0 ); }
static __always_inline int ENTROPY_INLINE | ( | null | , |
get_noise | |||
) | [inline, static] |
Definition at line 44 of file null_entropy.h.
{ /* All sample values are constant */ *noise = 0x01; return 0; }