Loading...
Searching...
No Matches
havege.h
Go to the documentation of this file.
/*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
*/
#ifndef MBEDTLS_HAVEGE_H
#define MBEDTLS_HAVEGE_H
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#include <stddef.h>
#include <stdint.h>
#define MBEDTLS_HAVEGE_COLLECT_SIZE 1024
#ifdef __cplusplus
extern "C" {
#endif
typedef struct mbedtls_havege_state {
uint32_t PT1, PT2, offset[2];
uint32_t pool[MBEDTLS_HAVEGE_COLLECT_SIZE];
uint32_t WALK[8192];
}
mbedtls_havege_state;
void mbedtls_havege_init(mbedtls_havege_state *hs);
void mbedtls_havege_free(mbedtls_havege_state *hs);
int mbedtls_havege_random(void *p_rng, unsigned char *output, size_t len);
#ifdef __cplusplus
}
#endif
#endif /* havege.h */
config.h
Configuration options (set of defines)
mbedtls_havege_free
void mbedtls_havege_free(mbedtls_havege_state *hs)
Clear HAVEGE state.
mbedtls_havege_init
void mbedtls_havege_init(mbedtls_havege_state *hs)
HAVEGE initialization.
mbedtls_havege_random
int mbedtls_havege_random(void *p_rng, unsigned char *output, size_t len)
HAVEGE rand function.
MBEDTLS_HAVEGE_COLLECT_SIZE
#define MBEDTLS_HAVEGE_COLLECT_SIZE
Definition havege.h:22
mbedtls_havege_state
HAVEGE state structure.
Definition havege.h:31
mbedtls_havege_state::PT1
uint32_t PT1
Definition havege.h:32
mbedtls_havege_state::WALK
uint32_t WALK[8192]
Definition havege.h:34
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::pool
uint32_t pool[MBEDTLS_HAVEGE_COLLECT_SIZE]
Definition havege.h:33