9#include "InternalCryptLib.h"
10#include <openssl/rand.h>
11#include <openssl/evp.h>
16CONST UINT8 DefaultSeed[] =
"UEFI Crypto Library default seed";
41 if (SeedSize > INT_MAX) {
49 if (EVP_add_digest (EVP_sha1 ()) == 0) {
58 RAND_seed (Seed, (UINT32)SeedSize);
60 RAND_seed (DefaultSeed,
sizeof (DefaultSeed));
63 if (RAND_status () == 1) {
92 if ((Output ==
NULL) || (Size > INT_MAX)) {
99 if (RAND_bytes (Output, (UINT32)Size) != 1) {
BOOLEAN EFIAPI RandomBytes(OUT UINT8 *Output, IN UINTN Size)
BOOLEAN EFIAPI RandomSeed(IN CONST UINT8 *Seed OPTIONAL, IN UINTN SeedSize)