33#define RNG_ALGORITHM_COUNT 2
50 mAvailableAlgoArrayCount = RNG_ALGORITHM_COUNT;
64 mAvailableAlgoArrayCount = 0;
101 if ((This ==
NULL) || (RNGValueLength == 0) || (RNGValue ==
NULL)) {
102 return EFI_INVALID_PARAMETER;
105 Status = EFI_UNSUPPORTED;
106 if (RNGAlgorithm ==
NULL) {
110 RNGAlgorithm = &gEfiRngAlgorithmSp80090Ctr256Guid;
116 if (
CompareGuid (RNGAlgorithm, &gEfiRngAlgorithmSp80090Ctr256Guid)) {
124 if (
CompareGuid (RNGAlgorithm, &gEfiRngAlgorithmRaw)) {
168 if ((This ==
NULL) || (RNGAlgorithmListSize ==
NULL)) {
169 return EFI_INVALID_PARAMETER;
174 if (*RNGAlgorithmListSize < RequiredSize) {
175 *RNGAlgorithmListSize = RequiredSize;
176 return EFI_BUFFER_TOO_SMALL;
179 if (RNGAlgorithmList ==
NULL) {
180 return EFI_INVALID_PARAMETER;
188 *RNGAlgorithmListSize = RequiredSize;
EFI_STATUS EFIAPI GenerateEntropy(IN UINTN Length, OUT UINT8 *Entropy)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
BOOLEAN EFIAPI GetRandomNumber64(OUT UINT64 *Rand)
EFI_STATUS EFIAPI GetAvailableAlgorithms(VOID)
VOID EFIAPI FreeAvailableAlgorithms(VOID)
EFI_STATUS EFIAPI RngGetInfo(IN EFI_RNG_PROTOCOL *This, IN OUT UINTN *RNGAlgorithmListSize, OUT EFI_RNG_ALGORITHM *RNGAlgorithmList)
EFI_STATUS EFIAPI RngGetRNG(IN EFI_RNG_PROTOCOL *This, IN EFI_RNG_ALGORITHM *RNGAlgorithm OPTIONAL, IN UINTN RNGValueLength, OUT UINT8 *RNGValue)
EFI_GUID EFI_RNG_ALGORITHM
EFI_STATUS EFIAPI RngGetBytes(IN UINTN Length, OUT UINT8 *RandBuffer)