]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseRngLibNull/BaseRngLibNull.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseRngLibNull / BaseRngLibNull.c
1 /** @file
2 Null version of Random number generator services.
3
4 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include <Library/DebugLib.h>
10 #include <Library/RngLib.h>
11
12 /**
13 Generates a 16-bit random number.
14
15 if Rand is NULL, then ASSERT().
16
17 @param[out] Rand Buffer pointer to store the 16-bit random value.
18
19 @retval TRUE Random number generated successfully.
20 @retval FALSE Failed to generate the random number.
21
22 **/
23 BOOLEAN
24 EFIAPI
25 GetRandomNumber16 (
26 OUT UINT16 *Rand
27 )
28 {
29 ASSERT (FALSE);
30 return FALSE;
31 }
32
33 /**
34 Generates a 32-bit random number.
35
36 if Rand is NULL, then ASSERT().
37
38 @param[out] Rand Buffer pointer to store the 32-bit random value.
39
40 @retval TRUE Random number generated successfully.
41 @retval FALSE Failed to generate the random number.
42
43 **/
44 BOOLEAN
45 EFIAPI
46 GetRandomNumber32 (
47 OUT UINT32 *Rand
48 )
49 {
50 ASSERT (FALSE);
51 return FALSE;
52 }
53
54 /**
55 Generates a 64-bit random number.
56
57 if Rand is NULL, then ASSERT().
58
59 @param[out] Rand Buffer pointer to store the 64-bit random value.
60
61 @retval TRUE Random number generated successfully.
62 @retval FALSE Failed to generate the random number.
63
64 **/
65 BOOLEAN
66 EFIAPI
67 GetRandomNumber64 (
68 OUT UINT64 *Rand
69 )
70 {
71 ASSERT (FALSE);
72 return FALSE;
73 }
74
75 /**
76 Generates a 128-bit random number.
77
78 if Rand is NULL, then ASSERT().
79
80 @param[out] Rand Buffer pointer to store the 128-bit random value.
81
82 @retval TRUE Random number generated successfully.
83 @retval FALSE Failed to generate the random number.
84
85 **/
86 BOOLEAN
87 EFIAPI
88 GetRandomNumber128 (
89 OUT UINT64 *Rand
90 )
91 {
92 ASSERT (FALSE);
93 return FALSE;
94 }