CryptRandNull.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /** @file
  2. Pseudorandom Number Generator Wrapper Implementation which does not provide
  3. real capabilities.
  4. Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>
  5. SPDX-License-Identifier: BSD-2-Clause-Patent
  6. **/
  7. #include "InternalCryptLib.h"
  8. /**
  9. Sets up the seed value for the pseudorandom number generator.
  10. Return FALSE to indicate this interface is not supported.
  11. @param[in] Seed Pointer to seed value.
  12. If NULL, default seed is used.
  13. @param[in] SeedSize Size of seed value.
  14. If Seed is NULL, this parameter is ignored.
  15. @retval FALSE This interface is not supported.
  16. **/
  17. BOOLEAN
  18. EFIAPI
  19. RandomSeed (
  20. IN CONST UINT8 *Seed OPTIONAL,
  21. IN UINTN SeedSize
  22. )
  23. {
  24. ASSERT (FALSE);
  25. return FALSE;
  26. }
  27. /**
  28. Generates a pseudorandom byte stream of the specified size.
  29. Return FALSE to indicate this interface is not supported.
  30. @param[out] Output Pointer to buffer to receive random value.
  31. @param[in] Size Size of random bytes to generate.
  32. @retval FALSE This interface is not supported.
  33. **/
  34. BOOLEAN
  35. EFIAPI
  36. RandomBytes (
  37. OUT UINT8 *Output,
  38. IN UINTN Size
  39. )
  40. {
  41. ASSERT (FALSE);
  42. return FALSE;
  43. }