2021-06-27 21:25:29 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: MBedTLS.cpp
|
|
|
|
Date: 2021-6-12
|
|
|
|
Author: Reece
|
|
|
|
***/
|
2021-09-30 14:57:41 +00:00
|
|
|
#include <Source/RuntimeInternal.hpp>
|
2021-06-27 21:25:29 +00:00
|
|
|
#include "MBedTLS.hpp"
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
AUKN_SYM int mbedtls_platform_entropy_poll(void *data, unsigned char *output, size_t len, size_t *olen)
|
|
|
|
{
|
2023-01-15 06:05:22 +00:00
|
|
|
Aurora::RNG::ReadSecureRNG(AuMemoryViewWrite { output, AuUInt32(len) });
|
2021-06-27 21:25:29 +00:00
|
|
|
*olen = len;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|