havege.h
Go to the documentation of this file.
/*
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
#ifndef MBEDTLS_HAVEGE_H
#define MBEDTLS_HAVEGE_H
#include <stddef.h>
#define MBEDTLS_HAVEGE_COLLECT_SIZE 1024
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
int PT1, PT2, offset[2];
int pool[MBEDTLS_HAVEGE_COLLECT_SIZE];
int 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 */
mbedtls_havege_state
HAVEGE state structure.
Definition: havege.h:38
mbedtls_havege_state::PT2
int PT2
Definition: havege.h:40
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_free
void mbedtls_havege_free(mbedtls_havege_state *hs)
Clear HAVEGE state.
MBEDTLS_HAVEGE_COLLECT_SIZE
#define MBEDTLS_HAVEGE_COLLECT_SIZE
Definition: havege.h:29