Mbed TLS v2.28.8
include
mbedtls
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
25
extern
"C"
{
26
#endif
27
31
typedef
struct
mbedtls_havege_state
{
32
uint32_t
PT1
,
PT2
,
offset
[2];
33
uint32_t
pool
[
MBEDTLS_HAVEGE_COLLECT_SIZE
];
34
uint32_t
WALK
[8192];
35
}
36
mbedtls_havege_state
;
37
43
void
mbedtls_havege_init
(
mbedtls_havege_state
*hs);
44
50
void
mbedtls_havege_free
(
mbedtls_havege_state
*hs);
51
61
int
mbedtls_havege_random
(
void
*p_rng,
unsigned
char
*output,
size_t
len);
62
63
#ifdef __cplusplus
64
}
65
#endif
66
67
#endif
/* havege.h */
mbedtls_havege_state::PT1
uint32_t PT1
Definition:
havege.h:32
mbedtls_havege_state::offset
uint32_t offset[2]
Definition:
havege.h:32
mbedtls_havege_state::PT2
uint32_t PT2
Definition:
havege.h:32
mbedtls_havege_state
HAVEGE state structure.
Definition:
havege.h:31
mbedtls_havege_state::pool
uint32_t pool[MBEDTLS_HAVEGE_COLLECT_SIZE]
Definition:
havege.h:33
mbedtls_havege_free
void mbedtls_havege_free(mbedtls_havege_state *hs)
Clear HAVEGE state.
mbedtls_havege_state::WALK
uint32_t WALK[8192]
Definition:
havege.h:34
mbedtls_havege_state
struct mbedtls_havege_state mbedtls_havege_state
HAVEGE state structure.
mbedtls_havege_random
int mbedtls_havege_random(void *p_rng, unsigned char *output, size_t len)
HAVEGE rand function.
config.h
Configuration options (set of defines)
mbedtls_havege_init
void mbedtls_havege_init(mbedtls_havege_state *hs)
HAVEGE initialization.
MBEDTLS_HAVEGE_COLLECT_SIZE
#define MBEDTLS_HAVEGE_COLLECT_SIZE
Definition:
havege.h:22
Generated on Wed Apr 24 2024 20:07:29 for Mbed TLS v2.28.8 by
1.8.17