/
githubmirror
/
shim
Обзор
Документация
Войти
/
githubmirror
/
shim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
Cryptlib/Rand/BaseRngLibNull.c
115 строк
2 KB
Nicolas Frayer
Cryptlib/OpenSSL: update to openssl 3.5.0
08 июл 2026, 17:36
08 июл 2026, 17:36
3b52c67
Код
Авторство
О чём код?
/** @file Null version of Random number generator services. Copyright (c) 2023, Arm Limited. All rights reserved.<BR> Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <efi.h> typedef EFI_GUID GUID; #include <Library/DebugLib.h> #include <Library/RngLib.h> //#include <Library/Rng.h> /** Generates a 16-bit random number. if Rand is NULL, then ASSERT(). @param[out] Rand Buffer pointer to store the 16-bit random value. @retval TRUE Random number generated successfully. @retval FALSE Failed to generate the random number. **/ BOOLEAN EFIAPI GetRandomNumber16 ( OUT UINT16 *Rand ) { return FALSE; } /** Generates a 32-bit random number. if Rand is NULL, then ASSERT(). @param[out] Rand Buffer pointer to store the 32-bit random value. @retval TRUE Random number generated successfully. @retval FALSE Failed to generate the random number. **/ BOOLEAN EFIAPI GetRandomNumber32 ( OUT UINT32 *Rand ) { return FALSE; } /** Generates a 64-bit random number. if Rand is NULL, then ASSERT(). @param[out] Rand Buffer pointer to store the 64-bit random value. @retval TRUE Random number generated successfully. @retval FALSE Failed to generate the random number. **/ BOOLEAN EFIAPI GetRandomNumber64 ( OUT UINT64 *Rand ) { return FALSE; } /** Generates a 128-bit random number. if Rand is NULL, then ASSERT(). @param[out] Rand Buffer pointer to store the 128-bit random value. @retval TRUE Random number generated successfully. @retval FALSE Failed to generate the random number. **/ BOOLEAN EFIAPI GetRandomNumber128 ( OUT UINT64 *Rand ) { return FALSE; } /** Get a GUID identifying the RNG algorithm implementation. @param [out] RngGuid If success, contains the GUID identifying the RNG algorithm implementation. @retval EFI_SUCCESS Success. @retval EFI_UNSUPPORTED Not supported. @retval EFI_INVALID_PARAMETER Invalid parameter. **/ EFI_STATUS EFIAPI GetRngGuid ( GUID *RngGuid ) { return EFI_UNSUPPORTED; }