bitsupplier.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*############################################################################
  2. # Copyright 2016 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_COMMON_BITSUPPLIER_H_
  17. #define EPID_COMMON_BITSUPPLIER_H_
  18. /*!
  19. * \file
  20. * \brief Random data supplier interface.
  21. */
  22. #if defined(_WIN32) || defined(_WIN64)
  23. #define __STDCALL __stdcall
  24. #else
  25. #define __STDCALL
  26. #endif
  27. /// Generates random data.
  28. /*!
  29. It is the responsibility of the caller of the SDK interfaces to
  30. implement a function of this prototype and to then pass a pointer
  31. to this function into methods that require it.
  32. \param[out] rand_data destination buffer
  33. \param[in] num_bits size of rand_data in bits
  34. \param[in] user_data user data passed through from api call.
  35. \returns zero on success and non-zero value on error.
  36. \ingroup EpidCommon
  37. */
  38. typedef int(__STDCALL* BitSupplier)(unsigned int* rand_data, int num_bits,
  39. void* user_data);
  40. #endif // EPID_COMMON_BITSUPPLIER_H_