VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseRngLib/BaseRngLibInternals.h@ 108794

Last change on this file since 108794 was 108794, checked in by vboxsync, 2 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1/** @file
2
3 Architecture specific interface to RNG functionality.
4
5Copyright (c) 2021, NUVIA Inc. All rights reserved.<BR>
6
7SPDX-License-Identifier: BSD-2-Clause-Patent
8
9**/
10
11#ifndef BASE_RNGLIB_INTERNALS_H_
12#define BASE_RNGLIB_INTERNALS_H_
13
14/**
15 Generates a 16-bit random number.
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
25ArchGetRandomNumber16 (
26 OUT UINT16 *Rand
27 );
28
29/**
30 Generates a 32-bit random number.
31
32 @param[out] Rand Buffer pointer to store the 32-bit random value.
33
34 @retval TRUE Random number generated successfully.
35 @retval FALSE Failed to generate the random number.
36
37**/
38BOOLEAN
39EFIAPI
40ArchGetRandomNumber32 (
41 OUT UINT32 *Rand
42 );
43
44/**
45 Generates a 64-bit random number.
46
47 @param[out] Rand Buffer pointer to store the 64-bit random value.
48
49 @retval TRUE Random number generated successfully.
50 @retval FALSE Failed to generate the random number.
51
52**/
53BOOLEAN
54EFIAPI
55ArchGetRandomNumber64 (
56 OUT UINT64 *Rand
57 );
58
59/**
60 Checks whether the RNG instruction is supported.
61
62 @retval TRUE RNG instruction is supported.
63 @retval FALSE RNG instruction is not supported.
64
65**/
66BOOLEAN
67EFIAPI
68ArchIsRngSupported (
69 VOID
70 );
71
72#endif // BASE_RNGLIB_INTERNALS_H_
Note: See TracBrowser for help on using the repository browser.

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