1 /*############################################################################ 2 # Copyright 2016-2018 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 17 /*! 18 * \file 19 * \brief Pseudo random number generator interface. 20 */ 21 22 #ifndef EXAMPLE_SIGNMSG_SRC_PRNG_H_ 23 #define EXAMPLE_SIGNMSG_SRC_PRNG_H_ 24 25 #if defined(_WIN32) || defined(_WIN64) 26 #define __STDCALL __stdcall 27 #else 28 #define __STDCALL 29 #endif 30 31 #include "epid/common/errors.h" 32 33 /// Creates Pseudo Random Number Generator for ::PrngGen() 34 EpidStatus PrngCreate(void** prng); 35 36 /// Delete object allocated with ::PrngCreate() 37 void PrngDelete(void** prng); 38 39 /// BitSupplier type of function 40 int __STDCALL PrngGen(unsigned int* rand_data, int num_bits, void* user_data); 41 42 #endif // EXAMPLE_SIGNMSG_SRC_PRNG_H_ 43