VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/RngLib.h@ 105668

Last change on this file since 105668 was 99404, checked in by vboxsync, 22 months ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/** @file
2 Provides random number generator services.
3
4Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#ifndef __RNG_LIB_H__
10#define __RNG_LIB_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**/
23BOOLEAN
24EFIAPI
25GetRandomNumber16 (
26 OUT UINT16 *Rand
27 );
28
29/**
30 Generates a 32-bit random number.
31
32 if Rand is NULL, then ASSERT().
33
34 @param[out] Rand Buffer pointer to store the 32-bit random value.
35
36 @retval TRUE Random number generated successfully.
37 @retval FALSE Failed to generate the random number.
38
39**/
40BOOLEAN
41EFIAPI
42GetRandomNumber32 (
43 OUT UINT32 *Rand
44 );
45
46/**
47 Generates a 64-bit random number.
48
49 if Rand is NULL, then ASSERT().
50
51 @param[out] Rand Buffer pointer to store the 64-bit random value.
52
53 @retval TRUE Random number generated successfully.
54 @retval FALSE Failed to generate the random number.
55
56**/
57BOOLEAN
58EFIAPI
59GetRandomNumber64 (
60 OUT UINT64 *Rand
61 );
62
63/**
64 Generates a 128-bit random number.
65
66 if Rand is NULL, then ASSERT().
67
68 @param[out] Rand Buffer pointer to store the 128-bit random value.
69
70 @retval TRUE Random number generated successfully.
71 @retval FALSE Failed to generate the random number.
72
73**/
74BOOLEAN
75EFIAPI
76GetRandomNumber128 (
77 OUT UINT64 *Rand
78 );
79
80#endif // __RNG_LIB_H__
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette