AuroraRuntime/Source/Extensions/LTM/LTM.cpp

29 lines
761 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(p, AuUInt32(n));
return MP_OKAY;
}
}