1 /*############################################################################ 2 # Copyright 2017 Intel Corporation 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 ############################################################################*/ 16 #ifndef EPID_MEMBER_TPM2_GETRANDOM_H_ 17 #define EPID_MEMBER_TPM2_GETRANDOM_H_ 18 19 /*! 20 * \file 21 * \brief SDK TPM API. 22 */ 23 24 #include "epid/common/errors.h" 25 26 /// \cond 27 typedef struct Tpm2Ctx Tpm2Ctx; 28 /// \endcond 29 30 /*! 31 \addtogroup Tpm2Module tpm2 32 \ingroup EpidMemberModule 33 @{ 34 */ 35 36 /// Get random data 37 /*! 38 This command returns the next num_bits from the random number generator (RNG). 39 40 \param[in,out] ctx 41 TPM context. 42 43 \param[in] num_bits 44 Number of bits to return. 45 46 \param[out] random_data 47 Output random bits. 48 49 \returns ::EpidStatus 50 51 \see Tpm2CreateContext 52 */ 53 EpidStatus Tpm2GetRandom(Tpm2Ctx* ctx, int const num_bits, void* random_data); 54 55 /*! @} */ 56 57 #endif // EPID_MEMBER_TPM2_GETRANDOM_H_ 58