havege.h
mbedtls/config.h
stddef.h
stdint.h
entropy.h
mbedtls/check_config.h
mbedtls/config.h
havege.h
limits.h
stddef.h
stdint.h
entropy.h
havege.h
mbedtls_havege_state
MBEDTLS_HAVEGE_COLLECT_SIZE
1024
struct mbedtls_havege_state typedef struct mbedtls_havege_state mbedtls_havege_state mbedtls_havege_state

HAVEGE state structure.

void void mbedtls_havege_init (mbedtls_havege_state *hs) mbedtls_havege_init mbedtls_havege_state * hs

HAVEGE initialization.

hs

HAVEGE state to be initialized

void void mbedtls_havege_free (mbedtls_havege_state *hs) mbedtls_havege_free mbedtls_havege_state * hs

Clear HAVEGE state.

hs

HAVEGE state to be cleared

int int mbedtls_havege_random (void *p_rng, unsigned char *output, size_t len) mbedtls_havege_random void * p_rng unsigned char * output size_t len

HAVEGE rand function.

p_rng

A HAVEGE state

output

Buffer to fill

len

Length of buffer

0

HAVEGE: HArdware Volatile Entropy Gathering and Expansion.

    /*
    *CopyrightTheMbedTLSContributors
    *SPDX-License-Identifier:Apache-2.0ORGPL-2.0-or-later
    */
    #ifndefMBEDTLS_HAVEGE_H
    #defineMBEDTLS_HAVEGE_H

    #if!defined(MBEDTLS_CONFIG_FILE)
    #include"mbedtls/config.h"
    #else
    #includeMBEDTLS_CONFIG_FILE
    #endif

    #include<stddef.h>
    #include<stdint.h>

    #defineMBEDTLS_HAVEGE_COLLECT_SIZE1024

    #ifdef__cplusplus
    extern"C"{
    #endif

    typedefstructmbedtls_havege_state{
    uint32_tPT1,PT2,offset[2];
    uint32_tpool[MBEDTLS_HAVEGE_COLLECT_SIZE];
    uint32_tWALK[8192];
    }
    mbedtls_havege_state;

    voidmbedtls_havege_init(mbedtls_havege_state*hs);

    voidmbedtls_havege_free(mbedtls_havege_state*hs);

    intmbedtls_havege_random(void*p_rng,unsignedchar*output,size_tlen);

    #ifdef__cplusplus
    }
    #endif

    #endif/*havege.h*/