mirror of
				https://git.proxmox.com/git/mirror_edk2
				synced 2025-10-31 09:21:56 +00:00 
			
		
		
		
	 9344f09215
			
		
	
	
		9344f09215
		
	
	
	
	
		
			
			https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
		
			
				
	
	
		
			81 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			81 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /** @file
 | |
|   Provides random number generator services.
 | |
| 
 | |
| Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
 | |
| SPDX-License-Identifier: BSD-2-Clause-Patent
 | |
| 
 | |
| **/
 | |
| 
 | |
| #ifndef __RNG_LIB_H__
 | |
| #define __RNG_LIB_H__
 | |
| 
 | |
| /**
 | |
|   Generates a 16-bit random number.
 | |
| 
 | |
|   if Rand is NULL, then ASSERT().
 | |
| 
 | |
|   @param[out] Rand     Buffer pointer to store the 16-bit random value.
 | |
| 
 | |
|   @retval TRUE         Random number generated successfully.
 | |
|   @retval FALSE        Failed to generate the random number.
 | |
| 
 | |
| **/
 | |
| BOOLEAN
 | |
| EFIAPI
 | |
| GetRandomNumber16 (
 | |
|   OUT     UINT16                    *Rand
 | |
|   );
 | |
| 
 | |
| /**
 | |
|   Generates a 32-bit random number.
 | |
| 
 | |
|   if Rand is NULL, then ASSERT().
 | |
| 
 | |
|   @param[out] Rand     Buffer pointer to store the 32-bit random value.
 | |
| 
 | |
|   @retval TRUE         Random number generated successfully.
 | |
|   @retval FALSE        Failed to generate the random number.
 | |
| 
 | |
| **/
 | |
| BOOLEAN
 | |
| EFIAPI
 | |
| GetRandomNumber32 (
 | |
|   OUT     UINT32                    *Rand
 | |
|   );
 | |
| 
 | |
| /**
 | |
|   Generates a 64-bit random number.
 | |
| 
 | |
|   if Rand is NULL, then ASSERT().
 | |
| 
 | |
|   @param[out] Rand     Buffer pointer to store the 64-bit random value.
 | |
| 
 | |
|   @retval TRUE         Random number generated successfully.
 | |
|   @retval FALSE        Failed to generate the random number.
 | |
| 
 | |
| **/
 | |
| BOOLEAN
 | |
| EFIAPI
 | |
| GetRandomNumber64 (
 | |
|   OUT     UINT64                    *Rand
 | |
|   );
 | |
| 
 | |
| /**
 | |
|   Generates a 128-bit random number.
 | |
| 
 | |
|   if Rand is NULL, then ASSERT().
 | |
| 
 | |
|   @param[out] Rand     Buffer pointer to store the 128-bit random value.
 | |
| 
 | |
|   @retval TRUE         Random number generated successfully.
 | |
|   @retval FALSE        Failed to generate the random number.
 | |
| 
 | |
| **/
 | |
| BOOLEAN
 | |
| EFIAPI
 | |
| GetRandomNumber128 (
 | |
|   OUT     UINT64                    *Rand
 | |
|   );
 | |
| 
 | |
| #endif  // __RNG_LIB_H__
 |