43 mAvailableAlgoArrayCount = 0;
82 if ((This ==
NULL) || (RNGValueLength == 0) || (RNGValue ==
NULL)) {
83 return EFI_INVALID_PARAMETER;
86 if (RNGAlgorithm ==
NULL) {
90 if (mAvailableAlgoArrayCount != 0) {
91 RNGAlgorithm = &mAvailableAlgoArray[0];
93 return EFI_UNSUPPORTED;
98 if (!EFI_ERROR (Status) &&
106 if (
CompareGuid (RNGAlgorithm, &gEfiRngAlgorithmRaw)) {
113 return EFI_UNSUPPORTED;
149 if ((This ==
NULL) || (RNGAlgorithmListSize ==
NULL)) {
150 return EFI_INVALID_PARAMETER;
155 if (RequiredSize == 0) {
157 return EFI_UNSUPPORTED;
160 if (*RNGAlgorithmListSize < RequiredSize) {
161 *RNGAlgorithmListSize = RequiredSize;
162 return EFI_BUFFER_TOO_SMALL;
165 if (RNGAlgorithmList ==
NULL) {
166 return EFI_INVALID_PARAMETER;
170 CopyMem (RNGAlgorithmList, mAvailableAlgoArray, RequiredSize);
171 *RNGAlgorithmListSize = RequiredSize;
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_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)
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_STATUS EFIAPI GetRngGuid(GUID *RngGuid)
EFI_GUID EFI_RNG_ALGORITHM
EFI_STATUS EFIAPI RngGetBytes(IN UINTN Length, OUT UINT8 *RandBuffer)