mirror of
https://onedev.site.tesses.net/tesses-framework
synced 2026-02-09 00:05:46 +00:00
Zero entropy and ctr_drbg
This commit is contained in:
@@ -372,8 +372,8 @@ namespace Tesses::Framework::Crypto
|
|||||||
bool RandomBytes(std::vector<uint8_t>& output, std::string personal_str)
|
bool RandomBytes(std::vector<uint8_t>& output, std::string personal_str)
|
||||||
{
|
{
|
||||||
#if defined(TESSESFRAMEWORK_ENABLE_MBED)
|
#if defined(TESSESFRAMEWORK_ENABLE_MBED)
|
||||||
mbedtls_entropy_context entropy;
|
mbedtls_entropy_context entropy={0};
|
||||||
mbedtls_ctr_drbg_context ctr_drbg;
|
mbedtls_ctr_drbg_context ctr_drbg={0};
|
||||||
|
|
||||||
mbedtls_entropy_init(&entropy);
|
mbedtls_entropy_init(&entropy);
|
||||||
mbedtls_ctr_drbg_init(&ctr_drbg);
|
mbedtls_ctr_drbg_init(&ctr_drbg);
|
||||||
|
|||||||
Reference in New Issue
Block a user