Reece Wilson
124038df62
[+] AuConsole::Commands::RemoveCommand [+] EExtendedUsage::eServerAuth [+] SysPanic2 for SysSafeLine hints (backtrace may contain optimized SysPanics, making tracing the true origin difficult) [*] Reworked SysAssertions [*] AuParse::EncodeHex now takes AuMemoryViewRead [*] AuRng::ReadSecureRNG now takes AuMemoryViewWrite [*] AuRng::ReadFastRNG now takes AuMemoryViewWrite
29 lines
783 B
C++
29 lines
783 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: LTM.cpp
|
|
Date: 2021-6-12
|
|
Author: Reece
|
|
***/
|
|
#include <Source/RuntimeInternal.hpp>
|
|
#include "LTM.hpp"
|
|
|
|
extern "C"
|
|
{
|
|
typedef enum
|
|
{
|
|
MP_OKAY = 0, /* no error */
|
|
MP_ERR = -1, /* unknown error */
|
|
MP_MEM = -2, /* out of mem */
|
|
MP_VAL = -3, /* invalid input */
|
|
MP_ITER = -4, /* maximum iterations reached */
|
|
MP_BUF = -5, /* buffer overflow, supplied buffer too small */
|
|
MP_OVF = -6 /* mp_int overflow, too many digits */
|
|
} mp_err;
|
|
|
|
AUKN_SYM mp_err s_mp_rand_platform(void *p, size_t n)
|
|
{
|
|
Aurora::RNG::ReadSecureRNG(AuMemoryViewWrite { p, AuUInt32(n) });
|
|
return MP_OKAY;
|
|
}
|
|
} |