9#include "InternalCryptLib.h"
58 volatile UINT64 TempRand;
63 if ((Output ==
NULL) || (Size > INT_MAX)) {
78 if (Size >=
sizeof (TempRand)) {
79 *((UINT64 *)Output) = TempRand;
80 Output +=
sizeof (UINT64);
81 Size -=
sizeof (TempRand);
83 CopyMem (Output, (VOID *)&TempRand, Size);
113 return Result ? 0 : -1;
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI GetRandomNumber64(OUT UINT64 *Rand)
BOOLEAN EFIAPI RandomBytes(OUT UINT8 *Output, IN UINTN Size)
BOOLEAN EFIAPI RandomSeed(IN CONST UINT8 *Seed OPTIONAL, IN UINTN SeedSize)
INT32 MbedtlsRand(VOID *RngState, UINT8 *Output, UINTN Len)