TianoCore EDK2 master
Loading...
Searching...
No Matches
BaseRngLibInternals.h File Reference

Go to the source code of this file.

Functions

BOOLEAN EFIAPI ArchGetRandomNumber16 (OUT UINT16 *Rand)
 
BOOLEAN EFIAPI ArchGetRandomNumber32 (OUT UINT32 *Rand)
 
BOOLEAN EFIAPI ArchGetRandomNumber64 (OUT UINT64 *Rand)
 
BOOLEAN EFIAPI ArchIsRngSupported (VOID)
 

Detailed Description

Architecture specific interface to RNG functionality.

Copyright (c) 2021, NUVIA Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file BaseRngLibInternals.h.

Function Documentation

◆ ArchGetRandomNumber16()

BOOLEAN EFIAPI ArchGetRandomNumber16 ( OUT UINT16 *  Rand)

Generates a 16-bit random number.

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

Definition at line 64 of file Rndr.c.

◆ ArchGetRandomNumber32()

BOOLEAN EFIAPI ArchGetRandomNumber32 ( OUT UINT32 *  Rand)

Generates a 32-bit random number.

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

Definition at line 89 of file Rndr.c.

◆ ArchGetRandomNumber64()

BOOLEAN EFIAPI ArchGetRandomNumber64 ( OUT UINT64 *  Rand)

Generates a 64-bit random number.

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

Definition at line 114 of file Rndr.c.

◆ ArchIsRngSupported()

BOOLEAN EFIAPI ArchIsRngSupported ( VOID  )

Checks whether the RNG instruction is supported.

Return values
TRUERNG instruction is supported.
FALSERNG instruction is not supported.

Checks whether RNDR is supported.

Return values
TRUERNDR is supported.
FALSERNDR is not supported.

Checks whether RDRAND is supported.

Return values
TRUERDRAND is supported.
FALSERDRAND is not supported.

Checks whether SEED is supported.

Return values
TRUESEED is supported.

Definition at line 130 of file Rndr.c.