TianoCore EDK2 master
|
#include "InternalCryptLib.h"
#include <openssl/rand.h>
#include <openssl/evp.h>
Go to the source code of this file.
Functions | |
BOOLEAN EFIAPI | RandomSeed (IN CONST UINT8 *Seed OPTIONAL, IN UINTN SeedSize) |
BOOLEAN EFIAPI | RandomBytes (OUT UINT8 *Output, IN UINTN Size) |
Variables | |
CONST UINT8 | DefaultSeed [] = "UEFI Crypto Library default seed" |
Pseudorandom Number Generator Wrapper Implementation over OpenSSL.
Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CryptRand.c.
Generates a pseudorandom byte stream of the specified size.
If Output is NULL, then return FALSE.
[out] | Output | Pointer to buffer to receive random value. |
[in] | Size | Size of random bytes to generate. |
TRUE | Pseudorandom byte stream generated successfully. |
FALSE | Pseudorandom number generator fails to generate due to lack of entropy. |
Definition at line 76 of file CryptRand.c.
Sets up the seed value for the pseudorandom number generator.
This function sets up the seed value for the pseudorandom number generator. If Seed is not NULL, then the seed passed in is used. If Seed is NULL, then default seed is used.
[in] | Seed | Pointer to seed value. If NULL, default seed is used. |
[in] | SeedSize | Size of seed value. If Seed is NULL, this parameter is ignored. |
TRUE | Pseudorandom number generator has enough entropy for random generation. |
FALSE | Pseudorandom number generator does not have enough entropy for random generation. |
Definition at line 36 of file CryptRand.c.
CONST UINT8 DefaultSeed[] = "UEFI Crypto Library default seed" |
Definition at line 16 of file CryptRand.c.