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