0.2.0-dev Download ZIP
49 lines ·1.3 KB Raw
| 1 | /** |
| 2 | * \file psa/crypto_driver_random.h |
| 3 | * \brief Definitions for PSA random and entropy drivers |
| 4 | * |
| 5 | * This file is part of the PSA Crypto Driver Model, containing functions for |
| 6 | * driver developers to implement to enable hardware to be called in a |
| 7 | * standardized way by a PSA Cryptographic API implementation. The functions |
| 8 | * comprising the driver model, which driver authors implement, are not |
| 9 | * intended to be called by application developers. |
| 10 | */ |
| 11 | |
| 12 | /* |
| 13 | * Copyright The Mbed TLS Contributors |
| 14 | * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later |
| 15 | */ |
| 16 | #ifndef PSA_CRYPTO_DRIVER_RANDOM_H |
| 17 | #define PSA_CRYPTO_DRIVER_RANDOM_H |
| 18 | |
| 19 | #include "crypto_driver_common.h" |
| 20 | |
| 21 | #ifdef __cplusplus |
| 22 | extern "C" { |
| 23 | #endif |
| 24 | |
| 25 | /** \defgroup driver_random Random and entropy drivers |
| 26 | * @{ |
| 27 | */ |
| 28 | |
| 29 | /** The type of the \p flags argument to `"get_entropy"` driver entry points. |
| 30 | * |
| 31 | * This implementation does not support any flags yet. |
| 32 | * |
| 33 | */ |
| 34 | typedef uint32_t psa_driver_get_entropy_flags_t; |
| 35 | |
| 36 | /** Flags requesting the default behavior for a `"get_entropy"` driver entry |
| 37 | * point. This is equivalent to \c 0. |
| 38 | * |
| 39 | * \see ::psa_driver_get_entropy_flags_t |
| 40 | */ |
| 41 | #define PSA_DRIVER_GET_ENTROPY_FLAGS_NONE ((psa_driver_get_entropy_flags_t) 0) |
| 42 | |
| 43 | /**@}*/ |
| 44 | |
| 45 | #ifdef __cplusplus |
| 46 | } |
| 47 | #endif |
| 48 | |
| 49 | #endif /* PSA_CRYPTO_DRIVER_RANDOM_H */ |