TianoCore EDK2 master
|
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/ArmTrngLib.h>
#include <Protocol/Rng.h>
#include "RngDxeInternals.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | GenerateEntropy (IN UINTN Length, OUT UINT8 *Entropy) |
RNG Driver to produce the UEFI Random Number Generator protocol.
The driver implements the EFI_RNG_ALGORITHM_RAW using the FW-TRNG interface to provide entropy.
Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file ArmTrng.c.
EFI_STATUS EFIAPI GenerateEntropy | ( | IN UINTN | Length, |
OUT UINT8 * | Entropy | ||
) |
Generate high-quality entropy source using a TRNG or through RDRAND.
[in] | Length | Size of the buffer, in bytes, to fill with. |
[out] | Entropy | Pointer to the buffer to store the entropy data. |
RETURN_SUCCESS | The function completed successfully. |
RETURN_INVALID_PARAMETER | Invalid parameter. |
RETURN_UNSUPPORTED | Function not implemented. |
RETURN_BAD_BUFFER_SIZE | Buffer size is too small. |
RETURN_NOT_READY | No Entropy available. |