MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RngLib.h File Reference

Functions

BOOLEAN EFIAPI GetRandomNumber16 (OUT UINT16 *Rand)
 
BOOLEAN EFIAPI GetRandomNumber32 (OUT UINT32 *Rand)
 
BOOLEAN EFIAPI GetRandomNumber64 (OUT UINT64 *Rand)
 
BOOLEAN EFIAPI GetRandomNumber128 (OUT UINT64 *Rand)
 

Detailed Description

Provides random number generator services.

Copyright (c) 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Function Documentation

BOOLEAN EFIAPI GetRandomNumber128 ( OUT UINT64 Rand)

Generates a 128-bit random number.

if Rand is NULL, then ASSERT().

Parameters
[out]RandBuffer pointer to store the 128-bit random value.
Return values
TRUERandom number generated successfully.
FALSEFailed to generate the random number.
BOOLEAN EFIAPI GetRandomNumber16 ( OUT UINT16 Rand)

Generates a 16-bit random number.

if Rand is NULL, then ASSERT().

Parameters
[out]RandBuffer pointer to store the 16-bit random value.
Return values
TRUERandom number generated successfully.
FALSEFailed to generate the random number.
BOOLEAN EFIAPI GetRandomNumber32 ( OUT UINT32 Rand)

Generates a 32-bit random number.

if Rand is NULL, then ASSERT().

Parameters
[out]RandBuffer pointer to store the 32-bit random value.
Return values
TRUERandom number generated successfully.
FALSEFailed to generate the random number.
BOOLEAN EFIAPI GetRandomNumber64 ( OUT UINT64 Rand)

Generates a 64-bit random number.

if Rand is NULL, then ASSERT().

Parameters
[out]RandBuffer pointer to store the 64-bit random value.
Return values
TRUERandom number generated successfully.
FALSEFailed to generate the random number.