VirtualBox

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

最後變更 在這個檔案從105668是 99404,由 vboxsync 提交於 23 月 前

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

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.6 KB
 
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__
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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