Mbed TLS v2.28.8
Loading...
Searching...
No Matches
havege.h
Go to the documentation of this file.
1
6/*
7 * Copyright The Mbed TLS Contributors
8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9 */
10#ifndef MBEDTLS_HAVEGE_H
11#define MBEDTLS_HAVEGE_H
12
13#if !defined(MBEDTLS_CONFIG_FILE)
14#include "mbedtls/config.h"
15#else
16#include MBEDTLS_CONFIG_FILE
17#endif
18
19#include <stddef.h>
20#include <stdint.h>
21
22#define MBEDTLS_HAVEGE_COLLECT_SIZE 1024
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
31typedef struct mbedtls_havege_state {
32 uint32_t PT1, PT2, offset[2];
34 uint32_t WALK[8192];
35}
37
44
51
61int mbedtls_havege_random(void *p_rng, unsigned char *output, size_t len);
62
63#ifdef __cplusplus
64}
65#endif
66
67#endif /* havege.h */
Configuration options (set of defines)
void mbedtls_havege_free(mbedtls_havege_state *hs)
Clear HAVEGE state.
void mbedtls_havege_init(mbedtls_havege_state *hs)
HAVEGE initialization.
struct mbedtls_havege_state mbedtls_havege_state
HAVEGE state structure.
int mbedtls_havege_random(void *p_rng, unsigned char *output, size_t len)
HAVEGE rand function.
#define MBEDTLS_HAVEGE_COLLECT_SIZE
Definition havege.h:22
HAVEGE state structure.
Definition havege.h:31
uint32_t WALK[8192]
Definition havege.h:34
uint32_t offset[2]
Definition havege.h:32
uint32_t pool[MBEDTLS_HAVEGE_COLLECT_SIZE]
Definition havege.h:33