]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/RngLib.h
MdePkg: fix comment typo in DebugLib.h
[mirror_edk2.git] / MdePkg / Include / Library / RngLib.h
CommitLineData
255c8e22
QL
1/** @file\r
2 Provides random number generator services.\r
3\r
4Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef __RNG_LIB_H__\r
16#define __RNG_LIB_H__\r
17\r
18/**\r
19 Generates a 16-bit random number.\r
20\r
21 if Rand is NULL, then ASSERT().\r
22\r
23 @param[out] Rand Buffer pointer to store the 16-bit random value.\r
24\r
25 @retval TRUE Random number generated successfully.\r
26 @retval FALSE Failed to generate the random number.\r
27\r
28**/\r
29BOOLEAN\r
30EFIAPI\r
31GetRandomNumber16 (\r
32 OUT UINT16 *Rand\r
33 );\r
34\r
35/**\r
36 Generates a 32-bit random number.\r
37\r
38 if Rand is NULL, then ASSERT().\r
39\r
40 @param[out] Rand Buffer pointer to store the 32-bit random value.\r
41\r
42 @retval TRUE Random number generated successfully.\r
43 @retval FALSE Failed to generate the random number.\r
44\r
45**/\r
46BOOLEAN\r
47EFIAPI\r
48GetRandomNumber32 (\r
49 OUT UINT32 *Rand\r
50 );\r
51\r
52/**\r
53 Generates a 64-bit random number.\r
54\r
55 if Rand is NULL, then ASSERT().\r
56\r
57 @param[out] Rand Buffer pointer to store the 64-bit random value.\r
58\r
59 @retval TRUE Random number generated successfully.\r
60 @retval FALSE Failed to generate the random number.\r
61\r
62**/\r
63BOOLEAN\r
64EFIAPI\r
65GetRandomNumber64 (\r
66 OUT UINT64 *Rand\r
67 );\r
68\r
c8b6f16d
TP
69/**\r
70 Generates a 128-bit random number.\r
71\r
72 if Rand is NULL, then ASSERT().\r
73\r
74 @param[out] Rand Buffer pointer to store the 128-bit random value.\r
75\r
76 @retval TRUE Random number generated successfully.\r
77 @retval FALSE Failed to generate the random number.\r
78\r
79**/\r
80BOOLEAN\r
81EFIAPI\r
82GetRandomNumber128 (\r
83 OUT UINT64 *Rand\r
84 );\r
85\r
255c8e22 86#endif // __RNG_LIB_H__\r