mbed client lightswitch demo
Dependencies: mbed Socket lwip-eth lwip-sys lwip
Fork of mbed-client-classic-example-lwip by
mbedtls/mbedtls/entropy_poll.h@11:cada08fc8a70, 2016-06-09 (annotated)
- Committer:
- mbedAustin
- Date:
- Thu Jun 09 17:08:36 2016 +0000
- Revision:
- 11:cada08fc8a70
Commit for public Consumption
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbedAustin | 11:cada08fc8a70 | 1 | /** |
| mbedAustin | 11:cada08fc8a70 | 2 | * \file entropy_poll.h |
| mbedAustin | 11:cada08fc8a70 | 3 | * |
| mbedAustin | 11:cada08fc8a70 | 4 | * \brief Platform-specific and custom entropy polling functions |
| mbedAustin | 11:cada08fc8a70 | 5 | * |
| mbedAustin | 11:cada08fc8a70 | 6 | * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved |
| mbedAustin | 11:cada08fc8a70 | 7 | * SPDX-License-Identifier: Apache-2.0 |
| mbedAustin | 11:cada08fc8a70 | 8 | * |
| mbedAustin | 11:cada08fc8a70 | 9 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| mbedAustin | 11:cada08fc8a70 | 10 | * not use this file except in compliance with the License. |
| mbedAustin | 11:cada08fc8a70 | 11 | * You may obtain a copy of the License at |
| mbedAustin | 11:cada08fc8a70 | 12 | * |
| mbedAustin | 11:cada08fc8a70 | 13 | * http://www.apache.org/licenses/LICENSE-2.0 |
| mbedAustin | 11:cada08fc8a70 | 14 | * |
| mbedAustin | 11:cada08fc8a70 | 15 | * Unless required by applicable law or agreed to in writing, software |
| mbedAustin | 11:cada08fc8a70 | 16 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| mbedAustin | 11:cada08fc8a70 | 17 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| mbedAustin | 11:cada08fc8a70 | 18 | * See the License for the specific language governing permissions and |
| mbedAustin | 11:cada08fc8a70 | 19 | * limitations under the License. |
| mbedAustin | 11:cada08fc8a70 | 20 | * |
| mbedAustin | 11:cada08fc8a70 | 21 | * This file is part of mbed TLS (https://tls.mbed.org) |
| mbedAustin | 11:cada08fc8a70 | 22 | */ |
| mbedAustin | 11:cada08fc8a70 | 23 | #ifndef MBEDTLS_ENTROPY_POLL_H |
| mbedAustin | 11:cada08fc8a70 | 24 | #define MBEDTLS_ENTROPY_POLL_H |
| mbedAustin | 11:cada08fc8a70 | 25 | |
| mbedAustin | 11:cada08fc8a70 | 26 | #if !defined(MBEDTLS_CONFIG_FILE) |
| mbedAustin | 11:cada08fc8a70 | 27 | #include "config.h" |
| mbedAustin | 11:cada08fc8a70 | 28 | #else |
| mbedAustin | 11:cada08fc8a70 | 29 | #include MBEDTLS_CONFIG_FILE |
| mbedAustin | 11:cada08fc8a70 | 30 | #endif |
| mbedAustin | 11:cada08fc8a70 | 31 | |
| mbedAustin | 11:cada08fc8a70 | 32 | #include <stddef.h> |
| mbedAustin | 11:cada08fc8a70 | 33 | |
| mbedAustin | 11:cada08fc8a70 | 34 | #ifdef __cplusplus |
| mbedAustin | 11:cada08fc8a70 | 35 | extern "C" { |
| mbedAustin | 11:cada08fc8a70 | 36 | #endif |
| mbedAustin | 11:cada08fc8a70 | 37 | |
| mbedAustin | 11:cada08fc8a70 | 38 | /* |
| mbedAustin | 11:cada08fc8a70 | 39 | * Default thresholds for built-in sources, in bytes |
| mbedAustin | 11:cada08fc8a70 | 40 | */ |
| mbedAustin | 11:cada08fc8a70 | 41 | #define MBEDTLS_ENTROPY_MIN_PLATFORM 32 /**< Minimum for platform source */ |
| mbedAustin | 11:cada08fc8a70 | 42 | #define MBEDTLS_ENTROPY_MIN_HAVEGE 32 /**< Minimum for HAVEGE */ |
| mbedAustin | 11:cada08fc8a70 | 43 | #define MBEDTLS_ENTROPY_MIN_HARDCLOCK 4 /**< Minimum for mbedtls_timing_hardclock() */ |
| mbedAustin | 11:cada08fc8a70 | 44 | #define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Minimum for the hardware source */ |
| mbedAustin | 11:cada08fc8a70 | 45 | |
| mbedAustin | 11:cada08fc8a70 | 46 | #if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) |
| mbedAustin | 11:cada08fc8a70 | 47 | /** |
| mbedAustin | 11:cada08fc8a70 | 48 | * \brief Platform-specific entropy poll callback |
| mbedAustin | 11:cada08fc8a70 | 49 | */ |
| mbedAustin | 11:cada08fc8a70 | 50 | int mbedtls_platform_entropy_poll( void *data, |
| mbedAustin | 11:cada08fc8a70 | 51 | unsigned char *output, size_t len, size_t *olen ); |
| mbedAustin | 11:cada08fc8a70 | 52 | #endif |
| mbedAustin | 11:cada08fc8a70 | 53 | |
| mbedAustin | 11:cada08fc8a70 | 54 | #if defined(MBEDTLS_HAVEGE_C) |
| mbedAustin | 11:cada08fc8a70 | 55 | /** |
| mbedAustin | 11:cada08fc8a70 | 56 | * \brief HAVEGE based entropy poll callback |
| mbedAustin | 11:cada08fc8a70 | 57 | * |
| mbedAustin | 11:cada08fc8a70 | 58 | * Requires an HAVEGE state as its data pointer. |
| mbedAustin | 11:cada08fc8a70 | 59 | */ |
| mbedAustin | 11:cada08fc8a70 | 60 | int mbedtls_havege_poll( void *data, |
| mbedAustin | 11:cada08fc8a70 | 61 | unsigned char *output, size_t len, size_t *olen ); |
| mbedAustin | 11:cada08fc8a70 | 62 | #endif |
| mbedAustin | 11:cada08fc8a70 | 63 | |
| mbedAustin | 11:cada08fc8a70 | 64 | #if defined(MBEDTLS_TIMING_C) |
| mbedAustin | 11:cada08fc8a70 | 65 | /** |
| mbedAustin | 11:cada08fc8a70 | 66 | * \brief mbedtls_timing_hardclock-based entropy poll callback |
| mbedAustin | 11:cada08fc8a70 | 67 | */ |
| mbedAustin | 11:cada08fc8a70 | 68 | int mbedtls_hardclock_poll( void *data, |
| mbedAustin | 11:cada08fc8a70 | 69 | unsigned char *output, size_t len, size_t *olen ); |
| mbedAustin | 11:cada08fc8a70 | 70 | #endif |
| mbedAustin | 11:cada08fc8a70 | 71 | |
| mbedAustin | 11:cada08fc8a70 | 72 | #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) |
| mbedAustin | 11:cada08fc8a70 | 73 | /** |
| mbedAustin | 11:cada08fc8a70 | 74 | * \brief Entropy poll callback for a hardware source |
| mbedAustin | 11:cada08fc8a70 | 75 | * |
| mbedAustin | 11:cada08fc8a70 | 76 | * \warning This is not provided by mbed TLS! |
| mbedAustin | 11:cada08fc8a70 | 77 | * See \c MBEDTLS_ENTROPY_HARDWARE_ALT in config.h. |
| mbedAustin | 11:cada08fc8a70 | 78 | * |
| mbedAustin | 11:cada08fc8a70 | 79 | * \note This must accept NULL as its first argument. |
| mbedAustin | 11:cada08fc8a70 | 80 | */ |
| mbedAustin | 11:cada08fc8a70 | 81 | int mbedtls_hardware_poll( void *data, |
| mbedAustin | 11:cada08fc8a70 | 82 | unsigned char *output, size_t len, size_t *olen ); |
| mbedAustin | 11:cada08fc8a70 | 83 | #endif |
| mbedAustin | 11:cada08fc8a70 | 84 | |
| mbedAustin | 11:cada08fc8a70 | 85 | #ifdef __cplusplus |
| mbedAustin | 11:cada08fc8a70 | 86 | } |
| mbedAustin | 11:cada08fc8a70 | 87 | #endif |
| mbedAustin | 11:cada08fc8a70 | 88 | |
| mbedAustin | 11:cada08fc8a70 | 89 | #endif /* entropy_poll.h */ |
Austin Blackstone
