]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Rand/CryptRandNull.c
Add interfaces to several library instances of BaseCryptLib.
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibRuntimeCryptProtocol / Rand / CryptRandNull.c
diff --git a/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Rand/CryptRandNull.c b/CryptoPkg/Library/BaseCryptLibRuntimeCryptProtocol/Rand/CryptRandNull.c
new file mode 100644 (file)
index 0000000..8838e22
--- /dev/null
@@ -0,0 +1,63 @@
+/** @file\r
+  Pseudorandom Number Generator Wrapper Implementation which does not provide\r
+  real capabilities.\r
+\r
+Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "InternalCryptLib.h"\r
+\r
+\r
+/**\r
+  Sets up the seed value for the pseudorandom number generator.\r
+\r
+  Return FALSE to indicate this interface is not supported.\r
+\r
+  @param[in]  Seed      Pointer to seed value.\r
+                        If NULL, default seed is used.\r
+  @param[in]  SeedSize  Size of seed value.\r
+                        If Seed is NULL, this parameter is ignored.\r
+\r
+  @retval FALSE  This interface is not supported.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+RandomSeed (\r
+  IN  CONST  UINT8  *Seed  OPTIONAL,\r
+  IN  UINTN         SeedSize\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return FALSE;\r
+}\r
+\r
+/**\r
+  Generates a pseudorandom byte stream of the specified size.\r
+\r
+  Return FALSE to indicate this interface is not supported.\r
+\r
+  @param[out]  Output  Pointer to buffer to receive random value.\r
+  @param[in]   Size    Size of randome bytes to generate.\r
+\r
+  @retval FALSE  This interface is not supported.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+RandomBytes (\r
+  OUT  UINT8  *Output,\r
+  IN   UINTN  Size\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return FALSE;\r
+}\r